|
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? See reader questions & answers on this topic! - Help others by sharing your knowledge
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.
User Contributions: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 March 27 2014 @ 02:12 PM
|

Comment about this article, ask questions, or add new information about this topic: