switch in gawk

switch in gawk

Omer Zak w1 at zak.co.il
Sun May 10 23:50:49 IDT 2009


On Sun, 2009-05-10 at 22:25 +0300, Oleg Goldshmidt wrote:
> So, if you have access to the latest RHEL/SLES, or Debian / Ubuntu /
> Gentoo / whatever, would you mind running
> 
> $ gawk 'END {switch(NR) {default: print NR}}' /dev/null
> 
> (or anything with switch that you fancy) and see if it barfs with a
> syntax error message or dutifully does what it is supposed to do?

$ gawk 'END {switch(NR) {default: print NR}}' /dev/null
gawk: END {switch(NR) {default: print NR}}
gawk:                 ^ syntax error

System:
$ uname -a
Linux c2 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux

$ cat /etc/debian_version
5.0.1
(this is Debian Lenny)

$ gawk --version
GNU Awk 3.1.5
Copyright (C) 1989, 1991-2005 Free Software Foundation.

$ dpkg -l | egrep gawk
ii  gawk                1:3.1.5.dfsg-4.1


-- 
"Kosher" Cellphones (cellphones with blocked SMS, video and Internet)
are menace to the deaf.  They must be outlawed!
(See also: http://www.zak.co.il/tddpirate/2006/04/21/the-grave-danger-to-the-deaf-from-kosher-cellphones/)
My own blog is at http://www.zak.co.il/tddpirate/

My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS:  at http://www.zak.co.il/spamwarning.html




More information about the Linux-il mailing list