[rancid] Re: Cisco commands containing ';'...

john heasley heas at shrubbery.net
Wed Sep 16 17:53:29 UTC 2009


Wed, Sep 16, 2009 at 01:37:35PM -0400, Ryan West:
> Have you tried an escape "\" ?

that will not work.  We'd have to add logic to do that.  I'd lean toward
doing that.  one hack option would be to encode it as its ascii value;
59 or 0x3b.  But, I dont recall off the top how to do that encoding for
tcl's printf (expect's send).

> Not sure it would help, but worth a try.
> 
> -ryan
> 
> -----Original Message-----
> From: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] On Behalf Of Jon Peatfield
> Sent: Wednesday, September 16, 2009 1:02 PM
> To: rancid-discuss at shrubbery.net
> Subject: [rancid] Cisco commands containing ';'...
> 
> I may have been expecting too much but I wanted to run:
> 
>   clogin -c 'conf t; boot system flash:bootimage1;flash:bootimage2; exit' a b c
> 
> to set the boot path on a set of identical switches.  Of course clogin 
> splits the command at the ; in the middle of the boot system command so 
> that fails...
> 
> So I thought I need to use -x and pass a file with the lines but that also 
> fails because it seems that clogin actually joins the lines from the file 
> with ; and then treats is just as if it was a -c option (ie it splits it 
> at all ; again).
> 
> So is there a way to bypass the split and get a real ; into a command?
> 
> A glance through the code doesn't suggest anything obvious but I may be 
> missing a trick...
> 
> -- 
> /--------------------------------------------------------------------\
> | "Computers are different from telephones.  Computers do not ring." |
> |       -- A. Tanenbaum, "Computer Networks", p. 32                  |
> ---------------------------------------------------------------------|
> | Jon Peatfield, _Computer_ Officer, DAMTP,  University of Cambridge |
> | Mail:  jp107 at damtp.cam.ac.uk     Web:  http://www.damtp.cam.ac.uk/ |
> \--------------------------------------------------------------------/
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss


More information about the Rancid-discuss mailing list