[rancid] custom command table and grep

Khurram Khan brokenflea at gmail.com
Wed Mar 6 08:24:49 UTC 2013


Hello All,

I've got a device that I'm building a custom command table for and trying
to grep out a ssh key that I don't want displayed in the configuration.
When running the command from cli on the device, the syntax looks like:

show configuration | grep -v "ssh "

and the cli command does what it's supposed to.

How do I incorporate the start/end quotes in the command table? I've tried
a couple of variations and the script errors out.

@commandtable = (
        {'no timestamps'      => 'DoNothing' },
        {'show configuration | grep -v "ssh "' => 'WriteTerm' },
);

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20130306/ae95f11a/attachment.html>


More information about the Rancid-discuss mailing list