Results 1 to 2 of 2
Hello,
I'm running into a formatting issue in my shell script basically I want to ssh into another server and run the following command:
/usr/bin/printf "[%lu] DISABLE_HOST_SVC_CHECKS;app.test.com\n" `date +%s` > ...
- 10-28-2009 #1Just Joined!
- Join Date
- Apr 2009
- Posts
- 15
SSH formatting command
Hello,
I'm running into a formatting issue in my shell script basically I want to ssh into another server and run the following command:
/usr/bin/printf "[%lu] DISABLE_HOST_SVC_CHECKS;app.test.com\n" `date +%s` > /usr/local/nagios3.0/var/rw/nagios.cmd
I've tried using the ` ` and ' ' formatting but I can't get it right. Can anyone please help me out?
ssh -l user test.server.com `/usr/bin/printf "[%lu] DISABLE_HOST_SVC_CHECKS;app.test.com\n" `date +%s` > /usr/local/nagios3.0/var/rw/nagios.cmd`
Thanks,
Nick
- 10-29-2009 #2Just Joined!
- Join Date
- Apr 2009
- Posts
- 15
Fixed the line:
ssh -l user test.server.com "/usr/bin/printf '[%lu] DISABLE_HOST_SVC_CHECK;app.test.com\n' `date +%s` > /usr/local/nagios3.0/var/rw/nagios.cmd"


Reply With Quote