The problem is still in mawk of Ubuntu 10.10

I found a version of mawk, maintained by a new developer:
  http://invisible-island.net/mawk/

New mawk changelog (debian patches included + new things):
  http://invisible-island.net/mawk/CHANGES

This version works as expected too:

for interpretter in gawk mawk ../mawk-1.3.4-20100625/mawk ; do
  echo "Running with $interpretter...";
  echo;
  echo "diecimila.name=Arduino Diecimila, Duemilanove, or Nano w/ATmega168" | 
$interpretter -v FS== '{boardname=$2; gsub(/[^a-zA-Z0-9_,./():-]/, "", 
boardname); print boardname }';
  echo;
done

------------------------------------------------------------
Running with gawk...

ArduinoDiecimila,Duemilanove,orNanow/ATmega168

Running with mawk...

mawk: line 1: regular expression compile failed (bad class -- [], [^] or [)
[^a-zA-Z0-9_,.
mawk: line 1: syntax error at or near )

Running with ../mawk-1.3.4-20100625/mawk...

ArduinoDiecimila,Duemilanove,orNanow/ATmega168

------------------------------------------------------------

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/490736

Title:
  mawk 1.3.3-13ubuntu1 incorrectly handles "/" in "[ ]" expressions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to