I want to change notification_interval from 15 to 2 for block File_Check only.
I tried changing line 6th after matching File_Check line with:
sed -e '6 /File_Check/ s/15/2/g' file.txt
but it did not work.
Here is file.txt:
define service {
host_name local
service_description Memory
check_command check_nrpe
max_check_attempts 3
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 15
contact_groups test
notification_period 24x7
notifications_enabled 0
notification_options w,c
_xiwizard nrpe
register 1
}
define service {
host_name local
service_description File_Check
check_command check_nrpe
max_check_attempts 3
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 15
contact_groups test
notification_period 24x7
notifications_enabled 0
notification_options w,c
_xiwizard nrpe
register 1
}