<div dir="ltr">I wrote a filter, and perhaps I&#39;m not doing it right but the one I&#39;ve got in the script is:<div><br></div><div><div>        if (/\s+ssh key \S / &amp;&amp; filter_pwds &gt;= 1) {</div><div>                ProcessHistory(&quot;ADMIN&quot;,&quot;&quot;,&quot;&quot;,&quot;#ssh key &lt;removed&gt;\n&quot;);</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">&lt;<a href="mailto:heas@shrubbery.net" target="_blank">heas@shrubbery.net</a>&gt;</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">&gt; Hello All,<br>
&gt;<br>
&gt; I&#39;ve got a device that I&#39;m building a custom command table for and trying<br>
&gt; to grep out a ssh key that I don&#39;t want displayed in the configuration.<br>
&gt; When running the command from cli on the device, the syntax looks like:<br>
&gt;<br>
&gt; show configuration | grep -v &quot;ssh &quot;<br>
&gt;<br>
&gt; and the cli command does what it&#39;s supposed to.<br>
&gt;<br>
&gt; How do I incorporate the start/end quotes in the command table? I&#39;ve tried<br>
&gt; a couple of variations and the script errors out.<br>
&gt;<br>
&gt; @commandtable = (<br>
&gt;         {&#39;no timestamps&#39;      =&gt; &#39;DoNothing&#39; },<br>
&gt;         {&#39;show configuration | grep -v &quot;ssh &quot;&#39; =&gt; &#39;WriteTerm&#39; },<br>
&gt; );<br>
<br>
</div></div>dont do it that way.  add your filter in WriteTerm, if you must.<br>
<br>
&gt;<br>
&gt; Thanks in advance!<br>
<br>
&gt; _______________________________________________<br>
&gt; Rancid-discuss mailing list<br>
&gt; <a href="mailto:Rancid-discuss@shrubbery.net">Rancid-discuss@shrubbery.net</a><br>
&gt; <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>