Hey guys
N00b on programming.. trying to write a shell script to run a command via cronjob..
Say there are two variables
Code:
live="a b c"
data=""I=data1" "I=data2" "o=data3""
"a" corresponds to "I=data1"; "b" to "I=data2"; "c" to "o=data3"
I need to run something like this. merge.sh is another script which is run
Code:
merge.sh $LIVE -n $data ~/dumping/$LIVE.dat
I want this command to run like
Quote:
merge.sh a -n "I=data1"
merge.sh b -n "I=data2"
merge.sh c -n "o=data3"
|
I know how to do it if there was only one variable
Code:
for DB in $LIVE; do
merge.sh ${DB} -n ${DB}
done;
But don't know how to do when two variables are involved.
Please help