Hi all,
I’ve probably found a bug in „grep“.
Here’s a way how to reproduce it:
s53mgt:/test2 # cat testfile
A
Ä
s53mgt:/test2 # grep -F -eÄ -eA testfile
A
Ä
s53mgt:/test2 # grep -i -eÄ -eA testfile
A
Ä
s53mgt:/test2 # grep -iF -eÄ -eA testfile
A
As you can see the last one does not give A and Ä but only A.
When I do the same with another testfile without an “Ä” (A-Umlaut) in it, it works like expected:
s53mgt:/test2 # cat testfile2
A
B
s53mgt:/test2 # grep -F -eB -eA testfile2
A
B
s53mgt:/test2 # grep -i -eB -eA testfile2
A
B
s53mgt:/test2 # grep -iF -eB -eA testfile2
A
B
s53mgt:/test2 # file testfile testfile2
testfile: UTF-8 Unicode text
testfile2: ASCII text
Here’s some information on my version of “grep”.
s53mgt:/test2 # rpm -qif /bin/grep
Name : grep Relocations: (not relocatable)
Version : 2.5.1a Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release : 20.17 Build Date: Tue Apr 22 03:47:13 2008
Install Date: Mon Jul 6 16:21:37 2009 Build Host: blacher.suse.de
Group : Productivity/Text/Utilities Source RPM: grep-2.5.1a-20.17.src.rpm
Size : 461697 License: GPL v2 or later
Signature : DSA/SHA1, Tue Apr 22 03:49:23 2008, Key ID a84edae89c800aca
Packager : http://bugs.opensuse.org
URL : http://www.gnu.org/software/grep/
Summary : Print lines matching a pattern
Description :
GNU grep, the "fastest grep in the west" (hopefully).
`grep' searches for lines matching a pattern.
Can you confirm this?
What can I do about it?
Regards
Andreas
---
Andreas Bergen
Solution Architect
All for One Steeb AG
Gottlieb-Manz-Straße 1
70794 Filderstadt
T +49 711 78807-689
F +49 711 78807-92689
M +49 151 53824-689
Andreas.Bergen@all-for-one.com