I run my program prog.c in the following way :
$ ./prog 1 > output.txt
where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
Like
$ ./prog 1 > output1.txt $ ./prog 2 > output2.txt $ ./prog 3 > output3.txt . . . $ ./prog 1000 > output1000.txt
I know that a shell script (using a for loop and a variable output file name) can be VERY useful.
But I dont know how to make it.
PLEASE HELP
Regards
Alice


Sign In
Create Account


Back to top









