hi guys,
i need to run the same python executable command on multiple input files, each having a different input path, and then write the output files to a different output path.
then i change a setting within the python code and re-run it on the same set of input files.
the python executable is coded to know what input file it needs in the input directory and it automatically dumps out a set of files in the output directory.
for example, with the executable having the first setting value, i run each line command by hand:
Code:
py27 exe.py -r /input_path1 -o /output_path1
py27 exe.py -r /input_path2 -o /output_path2
py27 exe.py -r /input_path3 -o /output_path3
py27 exe.py -r /input_path4 -o /output_path4
py27 exe.py -r /input_path5 -o /output_path5
etc...
then i look at the output files, and then change the executable's setting to a different value and re-run each line command by hand:
Code:
py27 exe.py -r /input_path1 -o /output_path1
py27 exe.py -r /input_path2 -o /output_path2
py27 exe.py -r /input_path3 -o /output_path3
py27 exe.py -r /input_path4 -o /output_path4
py27 exe.py -r /input_path5 -o /output_path5
etc...
this process is
very tedious.
what i'd like to do is to copy all the line commands into a single text file and then run an bash or AWK command (or something similar) on that text file to "batch" process the line commands, then i can change the setting's value in the python code, and re-run the batch.
i suspect this batch processing can be done inside the python code, only i'm not the owner of the code and it's waaaay outside my ability to write python, but i do understand a bit of bash and AWK
so i'm thinking something
very crude like...
Code:
#!/bin/sh
ListOfLineCommands.txt | { while read each line ; do
py27 exe.py )
done
}
can anybody help me? i'd really appreciate it!
thanks!
Todd