This takes a file cmds.batch and submits every line as a shell command to the condor queue.

cmds.batch
[code lang=”bash”]
cd working_dir;python /exec_path/script.py -param1 > logfile.log 2>&1;
cd working_dir;python /exec_path/script.py -param2 > logfile.log 2>&1;
cd working_dir;python /exec_path/script.py -param3 > logfile.log 2>&1;
[/code]

submit_to_condor.sh (submit_to_condor.sh cmds.batch)
[code lang=”bash”]
if [ $# -ne 1 ]
then
echo “Usage: execute_command_per_line filename”
exit 1
fi
filename=$1
while read line
do
printf “%s\n” “$line”
condor_run “$line” &
done < $filename
[/code]