HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Double quotes not getting appended to the fi...
Operating System - HP-UX
1833323
Members
2911
Online
110051
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
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
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
05-09-2011 02:03 PM
05-09-2011 02:03 PM
Double quotes not getting appended to the file
Hi All
I am running a scripts to append the following line to a file
postschedulecmd "rm -f /opt/hd/sa/tmp/dsmsched.pru; touch /opt/hd/sa/tmp/dsmerror.log; chmod 666 /opt/hd/sa/tmp/dsmerror.log"
but while runnig the following script
ssh -n ${HOST} echo 'postschedulecmd \ "rm -f /opt/hd/sa/tmp/dsmsched.pru; touch /opt/hd/sa/tmp/dsmerror.log; chmod 666 /opt/hd/sa/tmp/dsmerror.log" >> /tmp/shaik'
the double quates are not getting updated in the file
Can you please help me in this
Regards
-Binu
I am running a scripts to append the following line to a file
postschedulecmd "rm -f /opt/hd/sa/tmp/dsmsched.pru; touch /opt/hd/sa/tmp/dsmerror.log; chmod 666 /opt/hd/sa/tmp/dsmerror.log"
but while runnig the following script
ssh -n ${HOST} echo 'postschedulecmd \ "rm -f /opt/hd/sa/tmp/dsmsched.pru; touch /opt/hd/sa/tmp/dsmerror.log; chmod 666 /opt/hd/sa/tmp/dsmerror.log" >> /tmp/shaik'
the double quates are not getting updated in the file
Can you please help me in this
Regards
-Binu
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2011 02:36 PM
05-09-2011 02:36 PM
Re: Double quotes not getting appended to the file
Inside your echo ' ... ', the double quotes are being interpreted by the local shell ( I think ) or the remote shell.
To prevent that, escape them with a backslash as so...
echo 'posetschedulecmd \"rm -f ... \" >> /tmp/shaik'
So, if you want a double quote to be echoed, place a single backslash in front of it.
-klb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2011 04:16 PM
05-09-2011 04:16 PM
Re: Double quotes not getting appended to the file
look like you have an extra space after the first back slash, and missing the back slash for the second quote.
now try again.
ssh -n ${HOST} echo 'postschedulecmd \"rm -f /opt/hd/sa/tmp/dsmsched.pru; touch /opt/hd/sa/tmp/dsmerror.log; chmod 666 /opt/hd/sa/tmp/dsmerror.log\" >> /tmp/shaik'
now try again.
ssh -n ${HOST} echo 'postschedulecmd \"rm -f /opt/hd/sa/tmp/dsmsched.pru; touch /opt/hd/sa/tmp/dsmerror.log; chmod 666 /opt/hd/sa/tmp/dsmerror.log\" >> /tmp/shaik'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2011 10:04 PM
05-09-2011 10:04 PM
Re: Double quotes not getting appended to the file
I figured the first \ was to continue on a new line, not intended as an escape.
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 2025 Hewlett Packard Enterprise Development LP