Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get "rsh" job return code

Status
Not open for further replies.

Tison

Programmer
May 12, 1999
216
CH
I submit a job on a remote host and want the return code of the job returned to my local server.
EG.
"rsh host jobname"
"echo $?"
shows me a rc of 0 becuase the rsh command was successfull even if the jobname failed.
How do I get the rc of the jobname ?
 
Hi Tison,
if 'jobname' is your own program or script you can print
return code and to catch it.
for example 'jobname' a script
.....
RetCode=4
echo $RetCode

On your box
.....
RC=$(rsh host jobname)
if [[ "$RC" = "4" ]]
......

regards Boris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top