[rancid] Ignoring certain output in diffs

Hughes, Doug Douglas.Hughes at DEShawResearch.com
Wed Sep 10 14:26:07 UTC 2014


It's a bit of an FAQ.. Find the command callback in the crancid file for the command you are looking for.. (e.g. sub ShowVersion)

Scroll down to the main while loop therein. Find a 'next if' line

Add your own 'next if' line above or below that that will skip the thing you don't want.
e.g. next if (/^# 20[0-9][0-9]-[01][0-9]-[0-2][0-9]T/);

that'll match the thing you posted below and skip that date matching the regular expression.


From: Rancid-discuss [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Ben Sanders
Sent: Wednesday, September 10, 2014 9:53 AM
To: rancid-discuss at shrubbery.net
Subject: [rancid] Ignoring certain output in diffs

Good Day,

I am struggling trying to create a way to ignore lines in diff.  I have Patton devices which I am using the Cisco module for as it seems to grab the configuration.  Problem is every time you "show run" it generates a timestamp:

example:
#----------------------------------------------------------------#
#                                                                #
# SN4980/1E24V                                                   #
# R6.6 2014-07-11 H323 RBS SIP                                   #
# 2014-09-10T09:50:34                                            #
# SN/xxxxxxxxxx                                               #
# Generated configuration file                                   #
#                                                                #
#----------------------------------------------------------------#


Could someone lend a hand in ignoring the timestamp line??

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20140910/25437ab0/attachment.html>


More information about the Rancid-discuss mailing list