![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Notification from Background jobs | vibhor_agarwali | UNIX for Advanced & Expert Users | 19 | 06-20-2007 02:29 AM |
| limit the number of jobs to run. | GrepMe | Shell Programming and Scripting | 0 | 06-15-2007 10:39 AM |
| Issues with exit after running jobs in background | hyennah | Shell Programming and Scripting | 1 | 04-02-2007 10:44 PM |
| Background jobs | Jeremiorama | High Level Programming | 1 | 11-25-2005 05:48 AM |
| background jobs | qsi | Shell Programming and Scripting | 4 | 11-24-2004 01:45 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Background jobs exit status
i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help.
$cat run_job.ksh #!/usr/bin/ksh #################################### typeset -u SCHEMA_NAME=$1 count=0 cat $home/tablist.list| while read table do sas $table.sas & count=`expr $count + 1` echo $count RC=$? if (( $RC > 0 )); then echo " executing the n't succes for $table :$RC " exit 1 fi cnt=$(jobs -l | wc -l ) if [[ $cnt -le 5 ]] ; then continue else wait #echo "In the wait mode" fi done exit 0 Last edited by GrepMe; 06-15-2007 at 10:27 AM. Reason: can anybody help me. |
| Forum Sponsor | ||
|
|