I do a bad job at checking my work it seems. There are two problems:
definedefine service{
definenotification_interval 30
Awk is handling the first record differently and for this I don't have an answer. Its sticking the define down a row. I'm sure this is not the "proper" way but at this point I would do:
awk '{ RS="define" } $RS !~ /check_chris/ { print "define" $RS }' file | sed 's/definedefine service/define service/g' | sed 's/definenotification_interval/notification_interval/g' | less
Reputation Points: 1749
Solved Threads: 735
Senior Poster
Offline 3,948 posts
since Feb 2009