May 12, 2003 #1 aixTim MIS Jun 19, 2002 32 NL I'm looking for a way of extracting the return code of the command run on a remote system using rsh. $? gives me the return code from the rsh command itself. tia
I'm looking for a way of extracting the return code of the command run on a remote system using rsh. $? gives me the return code from the rsh command itself. tia
May 12, 2003 #2 victorv Vendor Aug 20, 2002 862 IT hi, if you have access to the targer system, try by create an executable script as /usr/local/launcher ------------------- #!/usr/bin/ksh $* echo $? exit 0 then, from the "client" system run rsh targethost /usr/local/launcher "my command" on output you'll see ouput of command (discard it) and on last line return code of your command If you want, may modify script as echo $? > /dev/null 2>&1 or two versions . try & by Upvote 0 Downvote
hi, if you have access to the targer system, try by create an executable script as /usr/local/launcher ------------------- #!/usr/bin/ksh $* echo $? exit 0 then, from the "client" system run rsh targethost /usr/local/launcher "my command" on output you'll see ouput of command (discard it) and on last line return code of your command If you want, may modify script as echo $? > /dev/null 2>&1 or two versions . try & by