title: Quickest way to split a string in bash
body: <p>The goal: produce a path from an integer.
  I need to split strings in fixed length (2 characters in this case), and then glue the pieces with a separator. Example : 123456 => 12/34/56, 12345 => 12/34/5.</p>
  
  <p>I found a solution with sed:</p>
  
  <pre><code>sed 's/\(..\)/\1\//g'
  </code></pre>
  
  <p>but I'm not sure it's really quick, since I'm really not searching for any analysis of the string content (which will always be an integer, if it's any importance), but really to split it in length 2 (or 1 if the original length is odd).</p>