Hello I need to grep for specific string and I need to print output before/after until a matching word. Here is an example: The string which I search is dmz (I need exact string match because I have similar strings that contain dmz1 which are not in my interest) and I need to print the whole output that start with "edit" until "next"
=============================
edit 1825
set uuid 1e73dff8-2037-51e7-9713-3539a6b60c4c
set srcintf "dmz" <---
set dstintf "tralalala"
set srcaddr tralalala
set dstaddr tralalala
set action accept
set status disable
set schedule "always"
set service "tralalala"
next
===========================
Thanks.