![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's | manas6 | UNIX for Dummies Questions & Answers | 0 | 06-05-2008 07:44 AM |
| Capture Oracle return code in shell script | Vikas Sood | Shell Programming and Scripting | 1 | 05-22-2006 06:32 PM |
| Store return code of shell script in oracle table | sveera | Shell Programming and Scripting | 3 | 05-04-2005 02:25 PM |
| Return Code of tar in AIX | dupeng | AIX | 3 | 02-23-2004 12:05 AM |
| mailx in kornshell script passing return code to CA-Unicenter | Connie | UNIX for Advanced & Expert Users | 1 | 04-23-2002 09:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
return code from script
hey all,
I have a simple script #!/bin/bash ./cron.sh test_a.txt & ./cron.sh test_b.txt & wait I want to invoke another program based on the return status of the above calls. How am I were to get that? Thanks! |
|
||||
|
Well...the short answer is "you can't do that". In the above example, the return code is lost.
One answer is to write the return code to a file: (myscript.sh; echo $? > /tmp/rc1) &You would need to make sure the temporary file is unique, but this should work. There aren't any elegant solutions, really. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|