Hi,
I want to extract a specific set of lines within a huge configuration file.
!
interface FastEthernet6/48
description test
switchport trunk allowed vlan 100-250
switchport private-vlan trunk native vlan 101
switchport private-vlan trunk allowed vlan 100-250
switchport private-vlan association trunk 100
switchport private-vlan association trunk 101
switchport mode private-vlan trunk
[lots of info cut out]
!
Let's say I want to extract the description line and some of the switchport lines.
But in this config file there are some differences, for example, one interface hasn't got an description and the other hasn't got a specific switchport line I am interested in.
Which command do I need to grep a specific set of lines, with the '!' as separator for an specific area I want to grep?
Bookmarks