Description of problem: awk should support this kind of syntax y = $1 !~ /Get/ ~ /1/ Version-Release number of selected component (if applicable): gawk-3.1.7-1.fc12.x86_64 How reproducible: Always Steps to Reproduce: cat << "EOF" > file 0 1 2 EOF cat << "EOF" > prog { y = $1 !~ /Get/ ~ /1/ z = $2 ~ /a/ !~ /[0-9]/ print y print z } EOF awk -f prog file > awk.stdout cat awk.stdout Actual results: awk: prog:2: y = $1 !~ /Get/ ~ /1/ awk: prog:2: ^ syntax error awk: prog:3: z = $2 ~ /a/ !~ /[0-9]/ awk: prog:3: ^ syntax error Expected results: 1 0 Additional info:
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I don't see this as an error. Operator ~ returns logical value, thus its result ($1 !~ /Get/) shouldn't be matched to regexp (or to be precise, it could be, but it makes no sense to me). Do you have any manual reference saying this should be possible? Did you report this upstream? I didn't notice any mail in their mailing list regarding this. I certainly won't change this behavior without upstream supporting it.
This is likely a bug. I've contacted the upstream maintainer. Will add comments when I get a reply.
gawk-3.1.8-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/gawk-3.1.8-1.fc13
gawk-3.1.8-1.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update gawk'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/gawk-3.1.8-1.fc13
Using the reproducer in comment#0, I confirmed that the reported problem is resolved using gawk-3.1.8-1.fc13
gawk-3.1.8-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
gawk-3.1.8-3.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/gawk-3.1.8-3.fc14
gawk-3.1.8-3.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.