Re: switch in gawk

2009-05-14 Thread Amit Aronovitch
On Sun, May 10, 2009 at 11:50 PM, Omer Zak wrote: > > $ 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 > >

Re: switch in gawk

2009-05-12 Thread Dotan Cohen
> 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 > Ubuntu (Kubuntu 9.04) has it the worst! $ gawk 'END {switch(NR) {default: print NR}}' /dev/null The program 'gawk' is cu

Re: switch in gawk

2009-05-11 Thread Amos Shapira
2009/5/12 Oleg Goldshmidt : > I am still curious about SLES (I suppose between CentOS and Fedora one > has a pretty good guess what RHEL has), so if you try it, please let > me know. CentOS 5.3 and Ubuntu 8.10 also give same error. Be aware that as far as I understand RHEL 5.x rules, you shouldn't

Re: switch in gawk

2009-05-11 Thread Oleg Goldshmidt
Oleg Goldshmidt writes: > 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 Thanks to everyone who answered. It seems that Cygwin is the sole dissenter (gawk compiled with

Re: switch in gawk

2009-05-10 Thread guy keren
i fails also on ubuntu 8.04 (certainly not the latest ubuntu since 9.04 came out, though). --guy Oleg Goldshmidt wrote: Hi, I would like to run a tiny and trivial gawk configuration survey. Background: I wrote a bunch of gawk scripts lately, and without giving it much thought I used the

Re: switch in gawk

2009-05-10 Thread Omer Zak
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

Re: switch in gawk

2009-05-10 Thread Shlomi Fish
On Sunday 10 May 2009 22:25:18 Oleg Goldshmidt wrote: > Hi, > > I would like to run a tiny and trivial gawk configuration survey. > > Background: I wrote a bunch of gawk scripts lately, and without giving > it much thought I used the switch statement quite liberally. To my > surprise, I found out t

switch in gawk

2009-05-10 Thread Oleg Goldshmidt
Hi, I would like to run a tiny and trivial gawk configuration survey. Background: I wrote a bunch of gawk scripts lately, and without giving it much thought I used the switch statement quite liberally. To my surprise, I found out that * switch is considered experimental in gawk * support for s