Searching config files

Add multiple show running config files into a folder and use Grep to pick out specific areas of interest that are hits in those files.

Results will include the files name where there is a match.

Useful Grep options:

grep -A 2 “interface loop” *
grep “ip-source-address” *
grep “ip route pref” *

-A After (2 lines)
-B Before
-i Case insensitive
-c Count
-r Recursive
-v Invert
-l Display filenames that match

* Wildcard for all files in current directory.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s