when going through devices with interface descriptions, for example
description “to site x interface gi0/0”;
description “to site y interfaace gi0/1”:
block pattern is
description {desc:string}
Since it is a description with multiple words and space delimited, is there a way to get the entire description no matter how many words there are? As the above would only get the first word.
similar to the way I would use grep for example:
grep '^description' ciscoconfig.txt
or if I wanted specific columns or text within lines beginning with description, I would grep and use awk like below
grep '^description' ciscoconfig.txt | awk '{print $2}'
grep '^description' ciscoconfig.txt | awk '{print $2 $4}'
grep '^description' ciscoconfig.txt | awk '{print $4 $2}'
Etc.
can anybody provide an NQE Example, Thanks
Question
NQE example similar to using grep and awk
Sign up
Already have an account? Login
Welcome to the Forward Networks Community
No account yet? Create an account
Select a login option:
Register / Login Forward Employee LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.



