1

Shell script defining for loops of parameters of separate program

view story
linux-howto

http://www.linuxquestions.org – Hello everyone, I've written a program in c++ (program.cpp)that needs to be run multiple times for all combinations of two parameters p1, p2 which are currently manually defined before each run. What I'd like to do is something to the effect of: for(p1=0; p1<p1max; p1++){for(p2=0; p2<p2max; p2++){run program.cpp}} where I can change the limits of the maximum values so the whole thing can be parallelized. After some searching a shell script seems the best way to do this, but I'm new to unix and so would appreciate some help getting started. Thank you. (HowTos)