Using a loop variable in a Bash script to pass different command-line arguments
I have a C++ program to which I pass two doubles as inputs from the command line using int main(int argc, char *argv[]){ double a,b; a = atof(argv[1]); b = atof(argv[2]); further code..... I run the code on a cluster using the qsub utility and I have a Bash script named 'jobsub.sh` to submit the jobs which looks like this: #!/bin/csh -f hostname cd /home/roy/codes/3D # Change directory first -- replace Mysubdir set startdir = `pwd` # Remember the directory we're in if( ! -d /scratch/$USER ) then mkdir /scratch/$USER # Create scratch directory endif # If it does not exist #cp infile12 /scratch/