Folks,
I have a textfile with the config of my router. Part of that config looks like this:
router config
...
ip access-list extended MyAccessList
remark this is my security rule
permit host 10.0.0.1 any
deny host 10.0.0.2 any
...
ip access-list extended YourAccessList
remark this is your security rule
permit host 192.168.0.1 any
deny host 192.168.0.2 any
...
router config
...
I want to script something that shows MyAccessList and all related entries (starting with remark/permit/deny).
So this should be the output:
ip access-list extended MyAccessList
remark this is my security rule
permit host 10.0.0.1 any
deny host 10.0.0.2 any
...
I have been thinking about combining grep and awk and a couple of other paths, but I don't even get close
Anyone an idea how to start something like this?
Much appreciated,
Philipz