[rancid] supressing login banner etc?

Carlos Asensio CAsensio at nexica.com
Thu Nov 10 11:51:41 UTC 2011


On 11/10/11, Carlos Asensio <CAsensio at nexica.com> wrote:
>
> -----Mensaje original-----
> De: rancid-discuss-bounces at shrubbery.net
> [mailto:rancid-discuss-bounces at shrubbery.net] En nombre de Lee
> Enviado el: martes, 08 de noviembre de 2011 23:34
> Para: rancid-discuss at shrubbery.net
> Asunto: [rancid] supressing login banner etc?
>
> clogin -c "cmd" dev1 dev2 ... devN  is a really nice way to collect
> the output from a bunch of devices.  My problem with it is that I get
> all the login and motd banner cruft.  Has anyone come up with an
> elegant way to strip out all the junk so you get just the command and
> command output?
>
> My work-around is something like
>
> clogin -c "sh platform summary"  sw1 sw2 sw3 sw4 ... swN |\
>  awk '/sh platform/ , /exit/' | tr -d "\r" > /tmp/output
>
> Anyone know of a better method?
>
> And am I the only one that would like an option to suppress all the
> login and banner msgs?  (but still see the error msgs)
>
> Thanks,
> Lee
> ***********************
>
> Hi Lee,
>
> I adapted the banners to what it's expected. So no '>' nor '#' character.

I remember :)  You had the rancid [early version] works, current
rancid can't login problem.

This is a separate issue - I'm looking for an rsh replacement &
"clogin -c cmd" is almost there.
  clogin -c cmd | awk '/cmd/ , /exit/'
does what I want but I tend to not get the "awk /cmd/" part right on
the first try & was wondering if there's an easier / less error-prone
way to get the same effect.

Thanks,
Lee

****************
Hi Lee,

Sorry but, as you may noticed, I misunderstood the problem.

I don't know how to help you with that issue, so best of luck :)!

Regards,
Carlos.





More information about the Rancid-discuss mailing list