offtopic - unix command

2002-05-16 Thread Bill Becker
Hello, Apologies for the slightly off-topic listing, but I know there are several unix command gurus out there. (Bambi?) Oracle 8.1.6 on Solaris 2.7. I am trying to execute an rsh command against another unix server; the actual command is rsh pnas1 chkpntmk oradata ckpt1 if [ $? != 0 ];

Re: offtopic - unix command

2002-05-16 Thread Steven Lembark
Is there a way to check for the success/failure of the actual remote command when using rsh? $a=$(rsh blah); and parse $a for output for an indication of the blah command succeeding or failing. -- Steven Lembark 2930 W. Palmer Workhorse Computing

offtopic - unix command

2002-05-16 Thread Bill Becker
But what if command blah does not output anything? In this case, $a is null, as it is when the command fails. Steven Lembark wrote: Is there a way to check for the success/failure of the actual remote command when using rsh? $a=$(rsh blah); and parse $a for output for an indication of

RE: offtopic - unix command

2002-05-16 Thread Kevin Lange
I do it all the time with a line like this : rsh $1 . ${vTARGETPROFILE};mkdir $2;echo \$? In this case, I am making a directory called $2 at host $1. The unix command sets the error value so when you can now get that value over on the calling machine. You could also do it like this: rsh

Re: offtopic - unix command

2002-05-16 Thread Steven Lembark
-- Bill Becker [EMAIL PROTECTED] But what if command blah does not output anything? In this case, $a is null, as it is when the command fails. Either: Look for a success message and change the sense of the test. Run the remote command in verbose mode. Wrap the remote command

Re: offtopic - unix command

2002-05-16 Thread Brian_P_MacLean
: Sent by: Subject: offtopic - unix command [EMAIL PROTECTED

Re: offtopic - unix command

2002-05-16 Thread Steven Lembark
-- [EMAIL PROTECTED] Haven't used rsh in many many moons (ssh is the correct way these daze), and I have no way to test this but maybe it will work. RTN=$(rsh otherbox mycmd parm1 parm2 ; [ ${?} -eq 0 ] echo OKAY || echo FAILED) if echo ${RTN} | grep OKAY 1/dev/null 21 then echo