Public bug reported:

Binary package hint: mawk

mawk is installed by default on 9.04, and gawk the default on 8.04, so
this code written on 8.04 failed on 9.04 until I notices that awk was a
different version

run this command, then plug in a USB device:
tail -n 0 -f /var/log/messages | awk '/new.*USB device/ {print "Attached"; 
fflush()} /USB disconnect/ {print "Dettached"; fflush()}'

expected output:
on USB drivice attach, the word "Attached"
on USB device detach, the word "Detached"

with mawk nothing is output.  tried 3 different PC's.

with gawk the expected output is received.

Also with mawk, `tail -n 0 -f /var/log/messages | grep "USB device"` does print 
the matching lines, so pipes from tail work
and `echo "new high speed USB device" | awk '/new.*USB device/ {print 
"Attached"; fflush()} /USB disconnect/ {print "Dettached"; fflush()}'` does 
output "Attached", so pipes from echo to awk work.

** Affects: mawk (Ubuntu)
     Importance: Undecided
         Status: New

-- 
tail piped to awk not processing
https://bugs.launchpad.net/bugs/382602
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to