[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: troubles &
From: |
Aharon Robbins |
Subject: |
Re: troubles & |
Date: |
Wed, 12 Nov 2008 17:18:37 +0200 |
Hi. I think this is some kind of quoting problem. You can try putting a \
in front of the & and see if that helps. Alternatively, put the text
of the program into a file and run it with `gawk -f', which should avoid
the problem entirely.
Also, 3.1.3 is quite old; the current version is 3.1.6.
Thanks,
Arnold
> Date: Tue, 11 Nov 2008 16:22:06 +0100
> From: "leopoldo tosi" <address@hidden>
> To: address@hidden
> Subject: troubles &
> Cc: address@hidden
>
> hi,
> I 've got somes troubles with this code
>
> echo daabaaaa | gawk "{ str = $1 ; sub( /a+/ , \"C&C\" , str ) ; print str }"
> gawk: cmd. line:1: { str = $1 ; sub( /a+/ , "C
> gawk: cmd. line:1: ^ unterminated string
>
> and others uses of this character '&'.
>
> I work with GNU Awk 3.1.3 of UnxUtils on xp sp2 con path:....
> C:\Documents and Settings\danilo\Documenti\my_proces\UnxUtils\usr\local\bin;
> C:\Documents and Settings\danilo\Documenti\my_proces\UnxUtils\usr\local\lib;
>
> here an exaple it works :
> echo daabaaaa | gawk "{ str = $1 ; sub( /a+/ , \"C*C\" , str ) ; print str }"
>
> could you help me, please?
> --
>
> cordiali saluti,
> leopoldo tosi
> tel. 346 3173582