![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exit Codes | cmschube | Shell Programming and Scripting | 1 | 04-04-2008 11:34 AM |
| difference b/t the exit codes $* and $@ | praveen_b744 | Shell Programming and Scripting | 1 | 09-19-2007 09:53 AM |
| Explanation for the exit codes 2 | sesedada | UNIX for Advanced & Expert Users | 1 | 06-25-2006 02:31 AM |
| Where can I find a list of exit codes? (Exit code 64) | jkuchar747 | UNIX for Dummies Questions & Answers | 3 | 12-07-2004 06:08 PM |
| exit codes | donna carter | High Level Programming | 3 | 05-31-2001 09:35 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
exit codes from rexec?
how do i/is there a way to return the exit code from the remote host?
echo $? from the local host only gives 0, if the rexec command itself executes successfully. But what if in the case of the remote command failiing? echo $? on the localhost still gives 0, but I'm interested in the exit code from the failing command on the REMOTE host... |
|
||||
|
hi reborg and all,
i tried that and it still returns 0. i even rexec'ed a nonsense command (something like "lsdflkjfd" - which I'm sure doesn't do anything...) and the echo $?, as in: rexec server1 "lsdflkjfd; echo $?" i log in with username and password, and it echoes back: ksh: lsdflkjfd: not found. 0 It still returns 0!!! ![]() |
|
||||
|
Why it worked for reborg but not for diego
The difference is that diego surrounded the remote call with double quotes, and reborg used single quotes.
In diego's case, his shell interpreted the string before sending it as an arg to rexec, so rexec passed the command ""lsdflkjfd; echo 0" As reborg pointed out, its vital you use single quotes |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|