title: Using Regex groups in bash
body: <p>Greetings, </p>
  
  <p>I've got a directory with a list of pdfs in it: </p>
  
  <p><code>file1.pdf, file2.pdf, morestuff.pdf ... etc.</code></p>
  
  <p>I want to convert these pdfs to pngs, ie</p>
  
  <p><code>file1.png, file2.png, morestuff.png ... etc.</code></p>
  
  <p>The basic command is, </p>
  
  <p><code>convert from to</code>,</p>
  
  <p>But I'm having trouble getting convert to rename to the same file name.  The obvious 'I wish it worked this way' is </p>
  
  <p><code>convert *.pdf *.png</code></p>
  
  <p>But clearly that doesn't work.  My thought process is that I should utilize regular expression grouping here, to say somethink like </p>
  
  <p><code>convert (*).pdf %1.png</code></p>
  
  <p>but that clearly isn't the right syntax.  I'm wondering <strong>what the correct syntax is</strong>, and whether there's a better approach (that doesn't require jumping into perl or python) that I'm ignoring.</p>
  
  <p>Thanks!</p>