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