[rancid] supressing login banner etc?

Carlos Asensio CAsensio at nexica.com
Thu Nov 10 08:13:29 UTC 2011


-----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.

Regards,
Carlos.


More information about the Rancid-discuss mailing list