The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
exit status of command in a pipe line topcat8 UNIX for Dummies Questions & Answers 10 10-19-2007 05:39 AM
how to find the exit status for the last executed command vijay.amirthraj UNIX for Dummies Questions & Answers 1 07-04-2006 11:14 PM
Verifying remote command status ravikiran HP-UX 0 06-08-2006 11:36 AM
Incorrect Exit Status Returned from FTP command - Help?? frustrated1 Shell Programming and Scripting 3 08-22-2003 04:25 AM
How to find the exit status of last command in Unix? rajugp1 High Level Programming 1 09-10-2002 12:52 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-23-2006
zoonalex zoonalex is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 1
Exclamation Getting the exit status of a remote command

Hi to everyone.

How can I get the exit status from a remote command executed with rexec?

machine A has RedHat Linux 9 and the remote machine B has SCO UNIX.

Code:

rexec -l user -p password host sh /u/files/scripts/seq_cal.sh 2006 08

I want the exit status returned by seq_cal.sh not the one returned by rexec. It always return 0, that means its execution was okay.

Thanks
  #2 (permalink)  
Old 08-23-2006
spoodie's Avatar
spoodie spoodie is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 14
I'm not familar with rexec but if you need to do this you could try a wrapper script that reports the exit status as text, ie. start the wrapper script remotely and have that start the proper script and pickup the exit status for you. Obviously this wouldn't give you the exit status of the wrapper script but if it's simple enough you could assume it works fine or if it reports no exit status then assume it's failed.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:53 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0