GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: help I've lost the plot
Operating System - HP-UX
1847458
Members
3854
Online
110265
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
10-29-2006 09:54 PM
10-29-2006 09:54 PM
Hi,
I am trying to write a very simple ssh script to collect space information on a number of servers so I can simpy scp a depot file to install. If I run the following string on the command line all is well:-
ssh ${i} bdf /home/noddy | grep dev | awk '{print $4}' >/tmp/output
If I run the same command within a script the output file is created on the remote host and not locally. I have put the above comand string in double quotes within the script and it has none of it. How do I get round this I'm sure I've done this many times before.
I am trying to write a very simple ssh script to collect space information on a number of servers so I can simpy scp a depot file to install. If I run the following string on the command line all is well:-
ssh ${i} bdf /home/noddy | grep dev | awk '{print $4}' >/tmp/output
If I run the same command within a script the output file is created on the remote host and not locally. I have put the above comand string in double quotes within the script and it has none of it. How do I get round this I'm sure I've done this many times before.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2006 11:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2006 11:45 PM
10-29-2006 11:45 PM
Re: help I've lost the plot
Thanks James I managed to work this out after playing around with the quotes. Basically if I double quote the command string and put a backslash infront of the variable i.e $4 then all was fine. Cheers anyway
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP