<div dir="ltr">I wrote a filter, and perhaps I'm not doing it right but the one I've got in the script is:<div><br></div><div><div> if (/\s+ssh key \S / && filter_pwds >= 1) {</div><div> ProcessHistory("ADMIN","","","#ssh key <removed>\n");</div>
<div> next;</div><div> }</div></div><div><br></div><div>the configuration from cli looks like this:</div><div><br></div><div><div> ssh key +A0xxl6l15l6s800mta4qnknyalr1je5u8s76zlcx3myxhbnhe5v5j0yv721a4x2len02e5hs7wykq0s2u9cemrh4vxfk3e78aegfu9rht1ktf9m7zrnn1p3815woa30nduz2febcn5dxnoa2157i8vvkzys843dhzkexqj5atn2fj6njnnplwoc0li9in2lzgi6m2bue2rckfxrvn0dl92m6k0szbb3rpq8evwyrpkm27awx9clm2rmr0w5zy6rf9bshz3kqsu2vlj9kit30riazgllauvx2zcpfgieuig9e1g8fs73staweu3a0lnaj7j4aem2w58mqw27gby32c0v1rpecks841obelgd5zhwij37jx2qghay3s61nd7ysf8fhqw62i05s1jq85yo009hs7230audxy0wqbe63nb0g601cym5s7q9srpo151dgm4qehv3k1b99cz2amtzwz1y85fbxoj0ahm0jxp01p9xdudo1qgot3l82qcwb2fplrrw2dojjz3bpe5xfhh19lg2xcwnebyvz8jh0489wb5sjd7551ijhpzue3u4a40uqam01a9lhte0nrscnemcj1jc1h4hb8rlapljk3h6gqbdcqg60r0amxoqp67q1912v3nyl556pue015a4euijgbaxw3sf6k05w19gk10xlxaek9rgtbj3nf5mwnmzlfjh1hs9alqm43izz1eei4zk8ind4x2alhshhu2ripv25oa98g7pwbm22cj3kny7ehjib2td35qksn79er1whrzb4pcqqqe3el0fwkke4o2t0dvwhrrsewhlr3lxrw91idqr11 len 488 type v2-rsa</div>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 6, 2013 at 11:32 AM, heasley <span dir="ltr"><<a href="mailto:heas@shrubbery.net" target="_blank">heas@shrubbery.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Wed, Mar 06, 2013 at 01:24:49AM -0700, Khurram Khan:<br>
<div><div class="h5">> Hello All,<br>
><br>
> I've got a device that I'm building a custom command table for and trying<br>
> to grep out a ssh key that I don't want displayed in the configuration.<br>
> When running the command from cli on the device, the syntax looks like:<br>
><br>
> show configuration | grep -v "ssh "<br>
><br>
> and the cli command does what it's supposed to.<br>
><br>
> How do I incorporate the start/end quotes in the command table? I've tried<br>
> a couple of variations and the script errors out.<br>
><br>
> @commandtable = (<br>
> {'no timestamps' => 'DoNothing' },<br>
> {'show configuration | grep -v "ssh "' => 'WriteTerm' },<br>
> );<br>
<br>
</div></div>dont do it that way. add your filter in WriteTerm, if you must.<br>
<br>
><br>
> Thanks in advance!<br>
<br>
> _______________________________________________<br>
> Rancid-discuss mailing list<br>
> <a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>
> <a href="http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss" target="_blank">http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss</a><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>- kk
</div>