[rancid] Re: Trouble with awk
Shekhar Basnet
shekhar at mos.com.np
Wed Jul 12 09:59:08 UTC 2006
I am afraid I am not able to help you out. I use Linux and it worked for
me in the first shot. Maybe some experts in this list have more ideas as
I am not so familiar with awk myself.
[root at test mktop]# uname -a
Linux test 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 i686
i386 GNU/Linux
-s
On Wed, 2006-07-12 at 15:26, Rikard Stemland Skjelsvik wrote:
> Thank you for taking the time to answer. I have tried what you
> suggested and it gives the following:
>
> # cat /usr/local/rancid/var/bsr/configs/* | ./mktop
> awk: ./mktop:392: sub(/^ +description +"/, ");
> awk: ./mktop:392: ^ unterminated string
> Broken Pipe
> #
>
> The only new line is "Broken Pipe"
>
> The command "cat /usr/local/rancid/var/bsr/configs/* " works fine
>
>
> --
> Rikard
>
>
>
> On Wed, 12 Jul 2006, Shekhar Basnet wrote:
>
> > cat /usr/local/rancid/var/bsr/configs/* | ./mktop
> >
> > s
> >
> > On Wed, 2006-07-12 at 14:15, Rikard Stemland Skjelsvik wrote:
> >> Hello!
> >>
> >> I'm in the process of checking out rancid and other related tools. I was
> >> very intriged by "Managing IP Networks with Free Software" at Nanog.
> >> When trying to run mktop i get the following error message(se below). I am
> >> not very familiar with awk and hope that someone on the list could point
> >> me in the right direction.
> >>
> >> Thank you for your time!
> >>
> >>
> >>
> >> # ./mktop /usr/local/rancid/var/bsr/configs > bsr.top
> >> awk: ./mktop:392: sub(/^ +description +"/, ");
> >> awk: ./mktop:392: ^ unterminated string
> >> # cat /usr/local/rancid/var/bsr/configs | ./mktop > bsr.top
> >> awk: ./mktop:392: sub(/^ +description +"/, ");
> >> awk: ./mktop:392: ^ unterminated stringth an
> >> "}" at line 63
> >>
> >>
> >> Line 389 to 394 is:
> >>
> >> /description "/ && (indent > 1) && (section[1] == "interfaces") && \
> >> (config == JUNOS) {
> >> sub(/^ +description +"/, "");
> >> sub(/\";$/, "");
> >> new_ifdesc = $0;
> >> next;
> >> }
> >>
> >> I am running awk version:
> >> # /usr/local/bin/awk --version
> >> GNU Awk 3.1.4
> >> Copyright (C) 1989, 1991-2003 Free Software Foundation
> >>
> >> on:
> >> # uname -a
> >> SunOS okm-cw2000 5.8 Generic_108528-27 sun4u sparc SUNW,Sun-Fire-V210
> >>
> >> --
> >> Rikard
> >
> >
More information about the Rancid-discuss
mailing list