Take the 2-minute tour ×  I got this error after execute shell
script as below.  $ ./script_test.sh ./script_test.sh: line 3:
syntax error near unexpected token `$'do\r'' '/script_test.sh:
line 3: `for ((j=0; j<"$N"; j++)) ; do  Script below   # This
script will launch 10 simulations for each value of the
PARAM1_LIST. # Simulations results will be stored in folders
named "myTest-i-j", where i # is the effective value of the
PARAM1_LIST for each simulation and j # is the 1 to 10
repetition for each i.  PARAM1_LIST=(1 2 5 10)  for (( j = 0 ; j
< $N; j++ )); do for i in ${PARAM1_LIST[@]}; do java -jar
N3Sim.jar myConfigFile.cfg myTest-${i}-${j} $i share|improve
this question Hard to tell due to the formatting above, but it
looks like you may need #!/bin/sh instead of !/bin/sh ? –  Kent
Jul 24 '13 at 8:26 The OP seems to have written a full shebang,
but markup ate the hash. –  Hennes Jul 24 '13 at 8:30 What error
exactly? –  Journeyman Geek Jul 24 '13 at 8:32 You can add a set
-x below the shebang line to get mor