Show Lines Before Search Term in Cisco Configuration

Here is a way to easily display several lines before what you are searching for in a Cisco router configuration.  Use “show run line | include <string>”.  The line modifier causes the device to number each line.  Then use “show run line | beginning <number> :” to start a few lines before.  Keep in mind these commands can be abbreviated.