Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I check the exit status of a remote command executed via “rsh” ?

Command executed remote rsh Status
0
Posted

How do I check the exit status of a remote command executed via “rsh” ?

0

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 January, 1991. 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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123