tumichaelf
IS-IT--Management
Hello,
I am new to awk, and while I can do using other scripting tools, I really want to learn how to properly use awk.
I have a file (/var/tmp/nrpe.config) that has a line
"command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -x /shared -x /software"
that I need to add text to.
The text I need to add is "-x /boot" so that the final line looks like
"command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -x /shared -x /software -x /boot"
I need to do this to 49 servers (/var/tmp/ is my test area, not the final area) and I can easily send a 1 line command across to all of the servers using perform.
Any help would be appreciated.
I am new to awk, and while I can do using other scripting tools, I really want to learn how to properly use awk.
I have a file (/var/tmp/nrpe.config) that has a line
"command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -x /shared -x /software"
that I need to add text to.
The text I need to add is "-x /boot" so that the final line looks like
"command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -x /shared -x /software -x /boot"
I need to do this to 49 servers (/var/tmp/ is my test area, not the final area) and I can easily send a 1 line command across to all of the servers using perform.
Any help would be appreciated.