Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Return code from remsh on HP-UX
this is a bit tricky, i have done this once, but cannot find the
actual script anymore: remsh returns success if it could connect to
the remote host, no matter what the returncode of the remote call is.
the way to do this, is to open a new filehandle (extra to stdin, stdout and stderr) redirect stderr into that, and echo $? into stderr. all of that on the remote site.
then you can de-compose that on the local site, i.e. read from stderr, this is your returncode, and redirect the extra filehandle back into stderr. Something along those lines anyway. if you dig around in the ksh and hpux newsgroups you should be able to find something like that.
Karsten
nejjari_at_yahoo.fr (Nejjari) wrote in message news:<28e0d9.0408060028.353d3c79_at_posting.google.com>...
> Hello,
>
> I have a script on HP-UX11.11 that need to remsh to another server
> HP-UX11.11 to run a full export of an Oracle db. These processes are
> automated, so we need to test that the remote script has successfuly
> completed.
> If you ran an echo $? after the remsh command it is only going to test
> that the actual 'remsh' command completed.
> What is the way to do that? (without logging the output from the
> remote script, and then grep for some value on that server)
>
> Thanks,
> Youssef
Received on Fri Aug 06 2004 - 09:19:13 CDT
![]() |
![]() |