How do I check the exit status of a remote command?
I am working on a bash script that will execute commands on remote computers using rsh. rsh itself returns an exit code, which I can access by echoing $?. But what I want is the exit code of the command that I remotely executed. Is there a way to get at this?