- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- "while read" loop and RCMDs
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
05-16-2001 01:45 PM
05-16-2001 01:45 PM
remsh $host chmod 600 $dbatools/backup/$1
rcp -rp $1 $host:$dbatools/backup
I also echo each command before execution for logging purposes. When I comment off the r-commands, echo shows all hosts & dbatools extracted. When I uncomment the r-commands, the while exits after processing the first host & dbatool extracted.
Help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2001 01:58 PM
05-16-2001 01:58 PM
Re: "while read" loop and RCMDs
remsh $host chmod 600 $dbatools/backup/$1
rcp -rp $1 $host:$dbatools/backup
The first thing that occurs to me is that there is no $dbatools/backup directory. Since remsh reports nothing about the exit status of the process, you would know nothing.
Also, it appears that the two commands are reversed, it seems you are try to do a chmod on the files before they have been rcp'ed.
I would also for safety's sdake add a change
rcp -rp $1 $host:$dbatools/backup
to
rcp -rp $1 $host:$dbatools/backup/
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2001 02:09 PM
05-16-2001 02:09 PM
Re: "while read" loop and RCMDs
Thanks for the reply. The reason I do the chmod first, is because the files are read-only.(ie 444), and they must be RW to be overwritten. BTW I am logged in as "oracle" while running this script, and "oracle" is the owner of all of the files being pushed to all the oracle hosts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2001 02:15 PM
05-16-2001 02:15 PM
Re: "while read" loop and RCMDs
Thought Number 2, (I assume you have done this outside your script but I have to ask so that I know we are not fighting hosts.equiv and .rhosts problems) Have you executed both commands as oracle. Unless you have stderr redirected I'm surprised that you don't see any error messages.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2001 02:19 PM
05-16-2001 02:19 PM
Re: "while read" loop and RCMDs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2001 02:32 PM