title: sort files before converting to pdf in imagemagick
body: <p>I have a folder full of image files I need to convert to a pdf.  I used wget to download them.  The problem is the ordering linux gives the files isn't the actual order of the pages, this is an example of the file ordering:</p>
  
  <pre><code>100-52b69f4490.jpg
  101-689eb36688.jpg
  10-1bf275d638.jpg
  102-6f7dc2def9.jpg
  103-2da8842faf.jpg
  104-9b01a64111.jpg
  105-1d5e3862d8.jpg
  106-221412a767.jpg
  ...
  </code></pre>
  
  <p>I can convert these images to a pdf using imagemagick, with the command 
  <code>convert *.jpg output.pdf</code></p>
  
  <p>but it'll put the pages into that pdf in the above order, not in human readable numerical order 1-blahblahblah.jpg, 2-blahblahblah.jpg, 3-blahblahblah.jpg etc.</p>
  
  <p>Is the easiest way to do this pipe the output of sort to convert?  or to pipe my wget to add each file as I'm getting it to a pdf file?</p>