Sample Header Ad - 728x90

Find pattern between special characters

1 vote
5 answers
557 views
I need a Sed/awk command to print the data between special charactes provided the pattern match should present in between special characters ({ & }) I have got a file which contains define service { host_name dns_vips service_description Multi Lookup use standard_service_template active_checks_enabled 1 passive_checks_enabled 1 notifications_enabled 1 contact_groups mailgrp max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 notification_interval 10 check_period 24x7 notification_period 24x7 notification_options w,r,c } define service { host_name dns_vips1 service_description Multi Lookup 2 use standard_service_template active_checks_enabled 1 passive_checks_enabled 1 notifications_enabled 1 contact_groups mailgrp1 max_check_attempts 3 normal_check_interval 5 retry_check_interval 1 notification_interval 10 check_period 24x7 notification_period 24x7 notification_options w,r,c } I need data between { and } when the service description matches Multi Lookup
Asked by harish (13 rep)
Oct 16, 2015, 08:46 AM
Last activity: Feb 6, 2024, 10:46 PM