[rancid] Questions about sub ProcessHistory
Lee
ler762 at gmail.com
Thu Apr 5 23:44:49 UTC 2018
On 4/5/18, Gauthier, Chris <cgauthier at comscore.com> wrote:
> So, more specifically, how is that string used as an argument? What's the
> significance of the "D99" or the "F1" or whatever the other value is?
> That's the part I'm not sure about. I want to leverage the ProcessHistory
> function with the keysort, but don't know what the argument value should be
> or how I determine what it should be.
I remember seeing a better explanation but this was the best I could find:
---------- Forwarded message ----------
From: john heasley <heas at shrubbery.net>
Date: Tue, 28 Sep 2010 15:28:01 -0700
Subject: Re: [rancid] sorting output from custom commands...
ProcessHistory(tag, command, command_arg, data)
data is added the buffer, by command with command_arg (if specified),
unless tag or command has changed since the last call, in which case
the buffer would be flushed before calling command.
a good example, where $aclsort = "ipsort" (the function)
# order access-lists
/^access-list\s+(\d\d?)\s+(\S+)\s+(\S+)/ &&
ProcessHistory("ACL $1 $2","$aclsort","$3","$_") && next;
More information about the Rancid-discuss
mailing list