Obtaining Error Return Status when using rsh remote command execution

From: Steven Sim (steven.sim@faplccc.net)
Date: Tue Aug 22 2006 - 10:53:13 EDT


Hey Gurus;

FORGIVE me if this is not the place to post this trivial scripting issue.

I wish to run the following Korn shell command in a script

rsh -n -l <user> <remote-host> "cksum <file>"

if [[ $? -ne 0 ]];
   <statements>
fi

The above would not successfully capture an error condition if <file>
did not exist in the remote server..

The remote rsh execution facility does not return the exit code of the
remote command.

Any ideas?

Warmest Regards
Steven Sim

Fujitsu Asia Pte. Ltd.
_____________________________________________________

This e-mail is confidential and may also be privileged. If you are not the intended recipient, please notify us immediately. You should not copy or use it for any purpose, nor disclose its contents to any other person.

Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:40:38 EDT