I cant able to edit the file from one server to another server.
Hi All,
I am very new for shell script, actually am try to edit the file from master server to client server, but i cant able to edit the client server file. I had use the below command. ssh -t user@hostename /usr/bin/sudo sh -c 'echo -e "#How long to keep log files (days), maximum is a month\n""#Change no 123456789 dated on 3rd April 2013\n""HISTORY=30" > /etc/sysconfig/sysstat' Can any one please help me out on this. Thanks in advance. Hariharan V. |
It would be easier to use:
Code:
ssh-t user@hostename /usr/bin/sudo sh -c "cat >/etc/sysconfig/sysstat" <<-EOF The blanks at the beginning of the lines is a "tab" character. man bash, and look for "here documents" |
Hi jpollard thanks a lot
|
All times are GMT -5. The time now is 05:11 PM. |