bsh152s
11-29-2001, 05:27 PM
I have a program that takes a parameter on the command line. I have a list of parameters that I want to run the program for in a file. Here's a little more info:
Paramfile
param1
param2
param3
...
I want a script that will simulate this:
myprogram param1
myprogram param2
myprogram param3
...
Right now, my script reads each line in Paramfile, writes all "myprogram paramx" to a new file, chmod u+x's the new file, and then runs the new executable. Surely there's a way to do this. I'm kinda new to scripting. Is there anyway to read from stdin in a shell script?
Paramfile
param1
param2
param3
...
I want a script that will simulate this:
myprogram param1
myprogram param2
myprogram param3
...
Right now, my script reads each line in Paramfile, writes all "myprogram paramx" to a new file, chmod u+x's the new file, and then runs the new executable. Surely there's a way to do this. I'm kinda new to scripting. Is there anyway to read from stdin in a shell script?