[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: Unix - Frequently Asked Questions (3/7) [Frequent posting]
Previous Document: How do I find the process ID of a program with a particular name ... ?
Next Document: Is it possible to pass shell variable settings into an awk program?
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: Unix - Frequently Asked Questions (3/7) [Frequent posting]
Previous Document: How do I find the process ID of a program with a particular name ... ?
Next Document: Is it possible to pass shell variable settings into an awk program?
How do I check the exit status of a remote command executed via "rsh"?
3.11) How do I check the exit status of a remote command
executed via "rsh" ?
This doesn't work:
rsh some-machine some-crummy-command || echo "Command failed"
The exit status of 'rsh' is 0 (success) if the rsh program
itself completed successfully, which probably isn't what
you wanted.
If you want to check on the exit status of the remote program,
you can try using Maarten Litmaath's 'ersh' script, which was
posted to alt.sources in October 1994. ersh is a shell script
that calls rsh, arranges for the remote machine to echo the
status of the command after it completes, and exits with that
status.
Top Document: Unix - Frequently Asked Questions (3/7) [Frequent posting]
Previous Document: How do I find the process ID of a program with a particular name ... ?
Next Document: Is it possible to pass shell variable settings into an awk program?
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
tmatimar@isgtec.com (Ted Timar)
Last Update October 22 2009 @ 05:35 AM