Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: offtopic - unix command
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 ${vTARGETHOST} ". ${vTARGETPROFILE};echo \${ORACLE_BASE" | read vTARGETORABASE
In this case, I am getting the value of ORACLE_BASE at the remote host vTARGETHOST and reading it into the variable vTARGETORABASE.
-----Original Message-----
Sent: Thursday, May 16, 2002 12:16 PM
To: Multiple recipients of list ORACLE-L
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 the blah command succeeding or failing.
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Bill Becker INET: beckerb_at_mfldclin.edu Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Kevin Lange INET: kgel_at_ppoone.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu May 16 2002 - 12:40:44 CDT
![]() |
![]() |