Shell script to run Python program with command line arguments
<p>I have some files in a directory which are input files for my python script:</p>

<pre><code>&lt;1.in&gt;
&lt;1.in.xml&gt;
&lt;2.in&gt;
&lt;2.in.xml&gt;
&lt;3.in&gt;
&lt;3.in.xml&gt;
...
..
.
</code></pre>

<p>I have the following till now:</p>

<pre><code>for i in $(ls dir/*.in)
do
        new = ${i%%.in}
        test.py -i $new.in.xml -o out_$new -x $new.in -c 56
done
</code></pre>

<p>When I run this, it does not create an output file (which is defined with -o option). 
The error is :</p>

<pre><code>IOError: [Errno 2] No such file or directory
</code></pre>

<p>Any suggestions?</p>
