bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

posiible bug in gawk


From: Bernd Klein
Subject: posiible bug in gawk
Date: Thu, 15 Jul 2010 14:59:04 +0200

Hi

I used the following file:

Victory Mansions, though not quickly enough to prevent a swirl of gritty
dust from entering along with him.
the
Bill
Appendix
the

Then I started gawk with the following command:

gawk '/^[A-Z]+[a-z]+$/ { print $0" "NR }' bsp.txt
which delivered the following output:
the 3
Bill 4
Appendix 5
the 6

This output is incorrect to my mind.

mawk delivers the correct or expected output:

mawk '/^[A-Z]+[a-z]+$/ { print $0" "NR }' bsp.txt
mawk output:

Bill 4
Appendix 5


-- 
Bernd Klein
Pomeziastr. 9
Tel. 07731/798180




reply via email to

[Prev in Thread] Current Thread [Next in Thread]