- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shell scripting
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2003 12:28 AM
04-03-2003 12:28 AM
Shell scripting
remsh
the string which i am looking for does not exist in the remote host,but still the exit status of the command is 0(success)..how is it possible?is there any other way to do this,kindly let me know.thanx in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2003 12:36 AM
04-03-2003 12:36 AM
Re: Shell scripting
exit status is 0 because it's the exit status of the remsh command and this command works fine
Try this
remsh
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2003 12:39 AM
04-03-2003 12:39 AM
Re: Shell scripting
The remsh commands succeds (and returns 0) this has no relation to the remote command. Have a look at man page for remsh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2003 12:45 AM
04-03-2003 12:45 AM
Re: Shell scripting
remsh
then $? will contain the result of the grep (as the last command in the line) not the remsh.
Hope this helps.
Stephen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2003 10:01 AM
04-03-2003 10:01 AM
Re: Shell scripting
See the return value part from man page:
RETURN VALUE
If remsh fails to set up the secondary socket connection, it returns
2. If it fails in some other way, it returns 1. If it fully succeeds
in setting up a connection with remshd, it returns 0 once the remote
command has completed. Note that the return value of remsh bears no
relation to the return value of the remote command.
Regards,
DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2003 11:22 AM
04-03-2003 11:22 AM
Re: Shell scripting
remsh
This will return the RC from the grep... In ksh you can further refine this
RC=$(remsh
echo $RC
Now you have the RC from the remote egrep.
Tim