I have some files in a directory which are input files for my python script:
<1.in> <1.in.xml> <2.in> <2.in.xml> <3.in> <3.in.xml> ... .. .
I have the following till now:
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
When I run this, it does not create an output file (which is defined with -o option). The error is :
IOError: [Errno 2] No such file or directory
Any suggestions?
test.py -i 1.in.xml -o out_1 -x 1.in -c 56
? would help you narrow down the problemnew
doesnt have the value you expect. can you try to echo outnew
right after you assign to it in each iteration?