Topic: All awk's on Solaris are broken!
Izvinjavam se za ime, ali nisam znao sta drugo da stavim.
Elem, evo jedne interesantne poruke sa comp.lang.awk liste koja objasnjava zasto nijedna awk implementacija na Solarisu ne radi ispravno:
...
Actually *ALL* awk implementations shipped with Solaris are broken :-/
cheusov@solaris>
0 cheusov>/usr/xpg4/bin/awk '$0 ~ /=/'
/usr/xpg4/bin/awk: syntax error Context is:
>>> $0 ~ /= <<<
1 cheusov>/usr/bin/nawk '$0 ~ /=/'
/usr/bin/nawk: syntax error at source line 1
context is
$0 ~ >>> /= <<<
/usr/bin/nawk: bailing out at source line 1
2 cheusov>/usr/bin/awk '$0 ~ /=/'
awk: syntax error near line 1
awk: bailing out near line 1
2 cheusov>uname -a
SunOS solaris 5.10 Generic_125100-08 sun4u sparc SUNW,Ultra-5_10
0 cheusov>
This is just one bug, there are others.
P.S.
"The One True AWK" by Brian Kernigan has also lots of problems.
Lots of them were sucessfully fixed in NetBSD.
- fixed: serious bug with regular expression, PR/33392
- fixed: support for multibyte charsets in tolower/toupper functions,
PR/36394
- fixed: there is a hardcoded limit on a number of open files, PR/37205
- fixed: incorrect handling of \ at the end of line in awk script, PR/37212
- fixed: incorrect matching of [:cntrl:], PR/38737
- fixed: warning about non-portable escape sequences, PR/39002
- fixed: free(): warning: junk pointer, too low to make sense, PR/39132
- fixed: -Ft is broken, PR/39133
- fixed: segfaults when "nextfile" is in BEGIN {...}, bin/39134
- fixed: nawk doesn't handle RS as a RE but as a single character, PR/30294
- fixed: awk(1) crash with RE and ^ anchor, PR/40689
Others are not fixed:
- Bizarre behavior in awk with invalid numeric constants, PR/42463
- LC_NUMERIC in awk is not POSIX compliant, PR/42320
- NetBSD awk/nawk concatenation op. is slower than that of GNU awk, PR/39759
- /usr/bin/awk: formatting issues in printf, PR/39135
- regexps should treat { and } as {n,m}, but as regular
characters, PR/38127
I sent all this to Brian, but he ignored all these issues and fixes.
...http://groups.google.com/group/comp.lan c46ee45910
Inace autor poruke je Aleksey Cheusov, tvorac RUNAWK wrapper-a za awk.
Upozorenje za sve koji koriste awk na Solarisu! ![]()
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD