title: Shell script to loop over all files in a folder and pick them in numerical order
body: <p>I have the following code to loop through the files of a folder. Files are named 1.txt, 2.txt all the way to 15.txt </p>
  
  <pre class="lang-sh prettyprint-override"><code>for file in .solutions/*; do 
      if [ -f "$file" ]; then 
          echo "test case ${file##*/}:"
          cat ./testcases/${file##*/}
          echo
          echo "result:"
          cat "$file"
          echo
          echo
      fi 
  done
  </code></pre>
  
  <p>My issue I get 1.txt then 10.txt to 15.txt displayed. </p>
  
  <p>I would like it to be displayed in <strong>numerical order</strong> instead of <strong>lexicographical order</strong>, in other words I want the loop to iterate though the files in numerical order.  Is there any way to achieve this?</p>