title: Curl and xargs in piped commands
body: <p>I want to process an old database where password are plain text (comma separated ; passwd is the 5th field in the csv file where the database has been exported) to crypt them for further use by dokuwiki. Here is my bash command (grep and sed are there to extract the crypted passwd from curl output) :</p>
  
  <pre><code>cat users.csv | awk 'FS="," { print $4 }' | xargs  -l bash -c 'curl -s --data-binary "pass1=$0&amp;pass2=$0" "https://sprhost.com/tools/SMD5.php" -o - ' | xargs  | grep -o '&lt;tt.*tt&gt;' | sed -e 's/tt//g' | sed -e 's/&lt;[^&gt;]*&gt;//g'
  </code></pre>
  
  <ul>
  <li><p>I get the following comment from xargs</p>
  
  <p>xargs: unmatched single quote; by default quotes are special to xargs unless you use the -0 option</p></li>
  <li><p>And only the first line of the file is processed, and nothing appends then.</p></li>
  </ul>
  
  <p>Using the -0 option, and playing around with quotes, doesn't solve anything. Where am I wrong in the command line ? May be a more advanced language will be more adequate to do this. </p>
  
  <p>Thank for help, LM</p>