My requirements is to look through a F-5 config.
Something like:
If x=virtual
grep for virtual | pool | destination
File looks like this:
virtual vs_website_443 {
snat automap
pool pl_website_443
destination 11.11.11.11:https
ip protocol tcp
persist pr_cookie_JSESSION_AP
profiles {
oneconnect-ebiz-blah {}
pr_http_ebiz_x_forwarded_for {}
serverssl {
serverside
}
tcp-lan-optimized {}
wildcard.origin.website.com {
clientside
}
}
plain
bash
, though can easily be converted to POSIX sh.where
file
is your data. You can change that to"$1"
and give the file as an argument to the script.tested with given data, returns:
using plain
awk
with the given data output is: