[Linux-Biella] Sempre script...
Mattia Rossi
linux@bilug.linux.it
Mon, 9 Jun 2003 15:14:02 +0200
On Mon, 9 Jun 2003 14:59:10 +0200
"CIARROCCHI Paolo" <Paolo.CIARROCCHI@vodafone.com> wrote:
-------- [ snip ] -------------
>
> bash-2.05$ awk -f maxMOMT.awk
> awk: syntax error near line 9
> awk: illegal statement near line 9
> awk: syntax error near line 10
> awk: illegal statement near line 10
> awk: syntax error near line 11
> awk: illegal statement near line 11
> awk: syntax error near line 12
> awk: illegal statement near line 12
>
> Confuso, molto confuso...
>
> Paolo
Mah, vedi se questo aiuta:
========================================================================
19. Why does SunOS/Solaris awk behave oddly?
I want to use the tolower() function with SunOS nawk, but all I get is
nawk: calling undefined function tolower
The SunOS nawk is from a time before awk acquired the tolower() and
toupper() functions. Either use one of the freely available awks, or
or use /usr/xpg4/bin/awk (if you have it), or write your own function
to do it using index, substr, and gsub.
An example of such a function is in O'Reilly's _Sed & Awk_.
Patrick TJ McPhee writes:
> SunOS includes three versions of awk. /usr/bin/awk is the old
> (pre-1989) version. /usr/bin/nawk is the new awk which appeared
> in 1989, and /usr/xpg4/bin/awk is supposed to conform to the single
> unix specification. No one knows why Sun continues to ship old awk.
========================================================================
Io ho usato:
[mattia@laser mattia]$ awk --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.
[mattia@laser mattia]$ which awk
/bin/awk
Mattia