[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep: obnoxious egrep vs i18n bug
From: |
Coleman, Michael |
Subject: |
grep: obnoxious egrep vs i18n bug |
Date: |
Wed, 14 Jul 2004 11:07:43 -0500 |
In egrep version 2.5.1, I'm seeing this behavior. Note particularly the
output of the third command:
address@hidden echo ABC | egrep -i -e 'abc'
ABC
address@hidden echo ABC | egrep -i -e 'abc|xxx'
ABC
address@hidden echo ABC | egrep -i -e 'a[b]c|xxx'
address@hidden echo ABC | egrep -i -e 'a[b]c'
ABC
address@hidden echo abc | egrep -i -e 'a[b]c|xxx'
abc
address@hidden echo $LANG
en_US.UTF-8
address@hidden echo ABC | LANG= egrep -i -e 'a[b]c|xxx'
ABC
I'm only slightly familiar with i18n, but I can't believe this output is
correct. I ran into this on a new RedHat machine, where $LANG is
apparently being set by default.
Here are a few particulars:
address@hidden ldd $(type -p grep)
libpcre.so.0 => /lib/libpcre.so.0 (0x40024000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
address@hidden ls -l /lib/tls/libc.so.6
lrwxrwxrwx 1 root root 13 Nov 17 2003
/lib/tls/libc.so.6 -> libc-2.3.2.so*
address@hidden ls -l /lib/libpcre.so.0
lrwxrwxrwx 1 root root 16 Nov 17 2003
/lib/libpcre.so.0 -> libpcre.so.0.0.1*
address@hidden egrep --version
egrep (GNU grep) 2.5.1
Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Mike
Mike Coleman, Scientific Programmer, +1 816 926 4419
Stowers Institute for Biomedical Research
1000 E. 50th St., Kansas City, MO 64110
- grep: obnoxious egrep vs i18n bug,
Coleman, Michael <=