DaemonForums  

Go Back   DaemonForums > Other Operating Systems > Solaris

Solaris SUN Solaris & OpenSolaris.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th January 2010
s0xxx's Avatar
s0xxx s0xxx is offline
Package Pilot
 
Join Date: May 2008
Posts: 192
Default All awk's on Solaris are broken!

Here is an interesting message from comp.lang.awk list that explains why all awk's that come with Solaris are "no good".
Quote:
...
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....f188c46ee45910

Author of message is Aleksey Cheusov, creator of RUNAWK wrapper utility for awk.

Warning for all using awk on Solaris!
__________________
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
Reply With Quote
  #2   (View Single Post)  
Old 20th January 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

My OpenSolaris machine comes with gawk by default, which seems to work Ok:

Code:
[~]% /usr/bin/gawk '$0 ~ /=/'
^C
[~]% uname -a
SunOS opensolaris 5.11 snv_111b i86pc i386 i86pc
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hardware broken? gosha General Hardware 2 25th November 2009 08:32 AM
Solaris by Megadeth was way more fun, Solaris 8 hanging on boot bleepingnetwork Solaris 2 18th November 2009 07:39 PM
videocard broken? gosha General Hardware 6 14th September 2009 05:25 AM
Broken Apache 2.2 Port casteld73 FreeBSD Ports and Packages 5 23rd January 2009 11:53 AM
Is something broken in BSD-Gnome2 rex FreeBSD General 13 8th May 2008 02:17 PM


All times are GMT. The time now is 08:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick