title: Bash - How to strip the first and last slash in a string if present?
body: <p>What is the most effective way to get:</p>
  
  <pre><code>'a/b/c'
  </code></pre>
  
  <p>out of input string that can be any of the following: </p>
  
  <pre><code>'/a/b/c/'
  'a/b/c/'
  '/a/b/c'
  'a/b/c'
  </code></pre>
  
  <p>in a bash script?</p>