title: rename files based on source file
body: <p>I have 224 pdf files and I'd like to prefix the files with a number and _</p>
  
  <p>Example: 
  stackoverflow_nov_2014.pdf</p>
  
  <p>File accounts.csv contains:
  2567,stackoverflow</p>
  
  <p>So the goal is to take 2567 and prefix it to the pdf file with an underscore:
  2567_stackoverflow_nov_2014.pdf</p>
  
  <p>I think I would want to use read -r in a while loop as explained here:
  <a href="https://unix.stackexchange.com/questions/147569/rename-a-batch-of-files-after-reading-from-a-source-file">https://unix.stackexchange.com/questions/147569/rename-a-batch-of-files-after-reading-from-a-source-file</a></p>
  
  <p>But when attempting this as it's written, the shell gives usage of mv command and nothing changes with the files.</p>
  
  <p>Edit: Adding sample data from sources file (accounts.csv)</p>
  
  <pre><code>11,My_Golf_Shop
  2567,stackoverflow    
  11122,Test_Store
  </code></pre>
  
  <p>By the way, the sources file (accounts.csv) isn't in the same order as the files in the directory as accounts.csv so somehow there would need to be matching with file name and the accounts.csv that occurs.</p>