1

sed multiline pattern match

view story
linux-howto

http://www.unix.com – How can I write a script that takes a cisco config file and outputs every occurrence of two, or more, pattern matches through the whole config file? For example, out of a config file, i want to print out every line with interface, description and ip address through the whole file, and disregard anything else. Example: interface Loopback1111 description aaaa ip vrf forwarding vaaaa ip address 1.1.1.1 ! interface Loopback2222 description bbbb ip vrf forwarding vbbbb ip address 2.2.2.2 ! (HowTos)