On Sun, May 10, 2009 at 11:50 PM, Omer Zak <w...@zak.co.il> 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 > > $ 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 >
On Debian, this was actually reported as bug and fixed - in version 3.1.6... My guess is that other distros will do the same sooner or later. So - right now this is not very portable, but I expect its use to spread in the future, as most new features do. see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=307510 console dump (Debian sid)----------> a...@penguin:~$ gawk 'END {switch(NR) {default: print NR}}' /dev/null 0 a...@penguin:~$ lsb_release -i -r Distributor ID: Debian Release: unstable a...@penguin:~$ dpkg --list gawk Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii gawk 1:3.1.6.dfsg-2 GNU awk, a pattern scanning and processing l <-----------
_______________________________________________ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il