####################
Correct Behavior:
####################

[r...@smrpt01 ~]$ uname -a
Linux smrpt01.nsgnav.com 2.6.18-194.11.4.el5 #1 SMP Tue Sep 21 05:04:09 EDT 
2010 x86_64 x86_64 x86_64 GNU/Linux
[r...@smrpt01 ~]$ printf "A\na\nZ\nz\n">  /tmp/foo
[r...@smrpt01 ~]$ od -c /tmp/foo
0000000   A  \n   a  \n   Z  \n   z  \n
0000010
[r...@smrpt01 ~]$ echo ${LANG}
en_US.UTF-8
[r...@smrpt01 ~]$ grep --version
grep (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.

[r...@smrpt01 ~]$ egrep "[^a-z]" /tmp/foo
A
Z

####################
Incorrect Behavior:
####################

[r...@dhcp233 2010-2011]$ uname -a
Linux dhcp233.hammer.home 2.6.34.7-56.fc13.x86_64 #1 SMP Wed Sep 15 03:36:55 
UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
[r...@dhcp233 2010-2011]$ printf "A\na\nZ\nz\n">  /tmp/foo
[r...@dhcp233 2010-2011]$ od -c /tmp/foo
0000000   A  \n   a  \n   Z  \n   z  \n
0000010
[r...@dhcp233 2010-2011]$ echo ${LANG}
en_US.UTF-8
[r...@dhcp233 2010-2011]$ grep --version
GNU grep 2.6.3

Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

[r...@dhcp233 2010-2011]$ egrep "[^a-z]" /tmp/foo
Z

####################
Thanks



Reply via email to