Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

Unix - Frequently Asked Questions (3/7) [Frequent posting]
Section - How do I check the exit status of a remote command executed via "rsh"?

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Business Photos and Profiles ]


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:

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

CAPTCHA