User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 I have no idea what is causing this bug but it appears to have presented itself in gawk 3.1.2, was still around in gawk 3.1.3, and was fixed in 3.1.4. I figured this out by compiling all the aforementioned versions by hand. Here's the expression that fails: gawk '{if ($2 == "1") if ($3 ~ /\w+@\w+/) print tolower($1)":"tolower($3)}' The text that it fails on (also attached): RIA4395 1 RIA4395.com ark Smith, Robert The workaround for now was to just install gawk-3.1.6 from sources but hopefully a fix can be backported before RHEL 4 is EOL'd. Reproducible: Always Steps to Reproduce: echo "RIA4395 1 RIA4395.com ark Smith, Robert" | \ gawk '{if ($2 == "1") if ($3 ~ /\w+@\w+/) print tolower($1)":"tolower($3)}' ...or if that didn't format properly: gawk '{if ($2 == "1") if ($3 ~ /\w+@\w+/) print tolower($1)":"tolower($3)}' <attached text> Actual Results: $ (an empty shell of a prompt) Expected Results: ria4395:ria4395.com
Created attachment 333528 [details] Text that the gawk expression fails on gawk 3.1.3 (RHEL 4) fails to parse this text using the following expression: gawk '{if ($2 == "1") if ($3 ~ /\w+@\w+/) print tolower($1)":"tolower($3)}' <attached example>