I have the following sample script to run a script the jobs with the same
priority(in this case field3) in parallel; wait for the jobs to finish
and run the next set of jobs in parallel.When all the lines are read
exit the script.
I have the following script which is doing evrything I want to, but the
script does not exit after completing all the jobs.
Would appreciate any input as to why the script doesnt exit
#!/bin/ksh
a=1
cat abc.txt | while read field1 field2 field3
do
F1=$field1
F2=$field2
priority=$field3
if[[ $priority -eq $a ]] ; then
run\_some_job.ksh - $F1 -$F2 $F3&
else
wait
a=`expr $a + 1`
fi
done
exit