[rancid] Help with suppressing part of the show run output
tosimpson at forchtgroup.com
Thu Feb 14 14:18:25 UTC 2013
How do I go about suppressing part of the show run output from Cisco devices? The first two lines every time. We have added a command recently to the config on several switches that when you use any show command, it adds the output from "show ip os summary" to the first of the output. Since this changes every time you run any command it shows up as a diff in RANCID every time.
I am assuming that this would be a regex, but I don't know where to begin adding it inside the rancid script, what would be the best section to put this in? Should it be possible to strip the first few lines off of the configuration output? Or would ignoring these lines be easier?
The config line that we added is: exec prompt timestamp
and it gets added to the vty config section
A couple of examples of the output that is added to the show run or any other show command is the following:
Load for five secs: 5%/0%; one minute: 6%; five minutes: 5%
Time source is NTP, 09:02:17.501 EDT Thu Feb 14 2013
Load for five secs: 5%/0%; one minute: 5%; five minutes: 5%
Time source is NTP, 09:06:14.333 EDT Thu Feb 14 2013
Since this happens after the command is input it can't be added as part of the prompt; so I guess I am stuck with either stripping it out of the config prior to parsing it, or just simply have rancid ignore it when it does run the diff...
Forcht Group of Kentucky
"We all knew there was just one way to improve our odds for survival: train, train, train. Sometimes, if your training is properly intense it will kill you. More often -- much, much more often -- it will save your life." - Richard Marcinko, former US Navy SEAL Team Commander
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
Forcht Group IT, 2400 South Main Street, Corbin, Ky.
More information about the Rancid-discuss