bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: troubles &


From: Manuel Collado
Subject: Re: troubles &
Date: Wed, 12 Nov 2008 10:02:46 +0100
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

leopoldo tosi escribió:
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;

This is not a gawk issue, but a Windows shell issue. The & character is a command separator. It must be escaped as ^& in order to be parsed by cmd.exe as a plain character in the command line.


here an exaple it works :
echo daabaaaa | gawk "{ str = $1 ; sub( /a+/ , \"C*C\" , str ) ; print str }"

Of course, it has not & chars.


could you help me, please?

Ditto.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado


reply via email to

[Prev in Thread] Current Thread [Next in Thread]