Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17837

How do I delete a matching line, the lines above and those below in the section?

$
0
0

In nagios config

define service{ use generic-service host_name xxx.xxx.com service_description xxx Status check_command check_http!xxx.xxx.com -S } 

I want to delete the entire section as given above matching regex xxx.xxx.com . How to do it using sed or any other Linux utility

submitted by nixstar
[link] [4 comments]

Viewing all articles
Browse latest Browse all 17837

Trending Articles