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

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

Re: gawk version 3.1.3.1614


From: Stepan Kasal
Subject: Re: gawk version 3.1.3.1614
Date: Wed, 30 Jun 2004 11:52:57 +0200
User-agent: Mutt/1.4.1i

Hello,

On Tue, Jun 29, 2004 at 11:39:27AM +0200, Roel Speerstra wrote:
> gawk.exe 'BEGIN { print "hello, world" }'
> i'll get the result
> gnu: cmd. line:1: 'BEGIN
> gnu: cmd. line:1: ^ invalid char ''' in expression
> Am I doing something wrong or is this a bug?

the message means that the character "single quote" is parsed as
aprt of the program.  This is because your environment doesn't
understand this kind of quoting.  This problem never occurs in
unix-like environments, it's specific to DOS-derived environments,
like various kinds of Windows.

There are several ways to solve the problem:

1) the simplest way is to use -f file.awk option instead of writing
the awk program on the cmd. line

2) use double quotes:
        gawk "BEGIN { print 1 }"
        gawk "BEGIN { print \"hello, world\" }"

3) install the cygwin environment and call gawk from the cygwin window,
ie. from bash instead of command.com or cmd.com.
Write bash scripts instead of DOS batch files or NT cmd files.

You wrote:
> I've just downloaded gawk for windows version 3.1.3.1614.

I don't understand what the number 1614 means. The latest official gawk
release is version 3.1.3. Perhaps that number indicates what Windows
port you use, ... You could try to ask the maintainers of the port.

Hope this helps,
        Stepan Kasal




reply via email to

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