I want to run several jobs in parallel using the a script that does serial calls to a parameterized script and submits it as a background job on each call. It's for a brute force script which on each call will run 1k of 10k total combinations. The following is my first hack at it.    #!/bin/bashfor i in $(seq 10)do    ./tmp/tmpsky/bd25Par.sh (i*1000-1000) (i*1000) &doneI want $1 to evaluate as 0,1000,2000 etc...and $2 to evaluate to 1000,2000,3000 etc. The & is to submit the script as a background job. The called module will pass $1 and $2 to be used with seq as follows #/bin/bash/for n in $(seq $1 1 $2)do...`The first script fails with unexpected token 'i*1000-1000'What have I done wrong? 
Passing math equations as parameters to a looping function
shell script;parameter
The first script fails with unexpected token 'i*1000-1000'What have I done wrong? The obvious error is that you are actually not calling the variable $i in your loop:for i in $(seq 10)do    ./tmp/tmpsky/bd25Par.sh (i*1000-1000) (i*1000) &doneIt should be:for i in $(seq 10)do    ./tmp/tmpsky/bd25Par.sh ($i*1000-1000) ($i*1000) &doneThus; use $i when using the variable. i in itself will not work.As far as doing math in the shell, see comment number 2.