you have a program/script for something which takes input as file name and gives you output e.g.
python abc.py data_10.dat
And now you have a list of data files and you want to run this script on all the files in list. One way is to do so is open the list file in Python and make a for loop for the file list. You may have to change many things in script. So here is easy solution.
for file in `cat list`; do python abc.py $file; done
and you are done :)
No comments:
Post a Comment