title: How to sort URLs based on path/levels?
body: <p>I want to sort URLs based on path/levels. How can I do it ? (It can be a online tool/PHP/bash/linux script), Anything is okay.</p>
  
  <pre><code>example.com/a
  example.com/b
  example.com/c
  example.com/aaa/1
  example.com/aaa/2
  example.com/aaa/3
  example.com/aaa/bbb/apath
  example.com/aaa/bbb/bpath
  example.com/aaa/bbb/cpath
  example.com/aaa/bbb/path/1
  example.com/aaa/bbb/path/2
  </code></pre>