Multi-line commands
David LaPorte
david_laporte at harvard.edu
Mon Nov 10 23:49:53 UTC 2003
try using the "\\n" construct (an escaped newline). For instance:
$clogin -f $cloginrc -u '$username' -p '$password' -c \"conf net\\nhost\\n$tftphost\\n$tftpacldir/$acls\"
this above is from a perl script - you may only need "\n" if you're
running it from the prompt.
On Tue, 11 Nov 2003, Nipper, Arnold wrote:
> I'm using rancid since a couple of months and find it very valuable esp.
> when retrieving the same information from a lot of routers/switches.
>
> There are some commands on the catalyst 6500 which require multiple lines of
> input (e.g. "clear counters" where you will be prompted for "Do you want to
> continue (y/n) [n]?").
>
> With IOS and telnetting into a router I've been successful (iirc) when
> separating the commands by "^M" (i.e. Ctrl-M). But that doesn't work with
> CatOS and rancid.
>
> How do you deal with multi-line comamnds?
>
>
> Regards, Arnold
>
>
More information about the Rancid-discuss
mailing list