/path/to/program -option x -site a
/path/to/program -option x -site b
...
/path/to/program -option x -site z
Using a bash
for line in `cat command.file`; do $line; done
would not work since I would end up with a -bash: -option: command not found
-bash: x: command not found
-bash: -site: command not found
error. So, here's some quick Python that can get the job done:
import os
f = open('/tmp/tmp-fix.commands')
for line in f:
print line.rstrip()
os.system(line.rstrip())
Yay for saving me some time! Cheers!
No comments:
Post a Comment