4

bash: feeding input to a script from a text file

view full story
linux-howto

http://www.linuxquestions.org – Hi all, I have a script which checks on my jobs that run on some cluster. The script, "script.sh", takes as an input the job-id for the job to be checked. Sometimes I have 100s of jobs and I want to check them all (for successful completion.) I could put these job-ids into a text file, "job-id.txt", each id in its own line. For each job-id, the script would ask me few questions (with a yes or no answers) to see if I want to do some other checks for each job-id. I want to know how may I direct my job-ids from this text file into the script one job-id at a time. Thanks in (HowTos)