[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: gawk version 3.1.3.1614
From: |
Roel Speerstra |
Subject: |
RE: gawk version 3.1.3.1614 |
Date: |
Wed, 30 Jun 2004 12:00:26 +0200 |
Hi Stepan,
Till yesterday i've used GNU Awk 3.1.1
gawk --version
GNU Awk 3.1.1
Copyright (C) 1989, 1991-2002 Free Software Foundation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
And in that version the ' works fine!
I'm working on both UNIX as WINDOWS/DOS hosts/environments & the scripts i
use must be portable...
The 3.1.3.1614 is indeed version 3.1.3 build 1614...
* gR.oetjeS.
* roel
_____
-----Oorspronkelijk bericht-----
Van: Stepan Kasal [mailto:address@hidden
Verzonden: woensdag 30 juni 2004 11:53
Aan: Roel Speerstra
CC: 'address@hidden'
Onderwerp: Re: gawk version 3.1.3.1614
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