title: passing command line arguments from xargs
body: <p>I have a shell script that does the following:</p>
  
  <p>INPUT_DIR is a directory containing zip files.  The zip files look like lograw1.zip, lograw2.zip etc.</p>
  
  <p>I have a program called prog.py that takes input as the zip file using an option -i and outputs a tsv file.  The tsv file corresponding to each zip file has a different name.</p>
  
  <p>i.e, lograw1.zip gives an ouput of logprocessed1.tsv</p>
  
  <p>I have a shell script with this for loop and it works perfectly.</p>
  
  <pre class="lang-sh prettyprint-override"><code>for f in $INPUT_DIR/*.zip
    do
      filename=$(basename $f .zip)
      tsvfilename="$(basename "${f/raw/processed}" .zip).tsv"
      python /work/prog.py -i $f  $OUTPUT_DIR/$tsvfilename
    done
  </code></pre>
  
  <p>I want to make use of xargs in a bash script to read through the zips and submit to my prog doing similar renaming of files. How can I use xargs to send as an argument between a command?
  Thanks in advance.</p>