Hi, I noticed odd behaviour using egrep, detail below:

1) Arch x86_64, grep (GNU grep) 2.14
[gwozniak@skin dziwas]$  echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
Ba
cc
ff
Gg
[gwozniak@skin dziwas]$  echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[[:lower:]]'
aB
cc
ff

2) Debian 6.0.6 x86_64, GNU grep 2.6.3
gwozniak@smssrv2:~$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
Ba
cc
ff
Gg
gwozniak@smssrv2:~$  echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[[:lower:]]'
aB
cc
ff
3)Debian 6.0.1, GNU grep 2.6.3
gwozniak@wsmgw_perl:~$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
Ba
cc
ff
Gg
gwozniak@wsmgw_perl:~$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[[:lower:]]'
aB
cc
ff
4) and finally my company notebook with old not updated Arch i686 (I love kde 
3.5 and cant imagine work without it :) ), also GNU grep 2.6.3 but result is 
something what I would expect:
[gwozniak@nb-gwozniak-lin ~]$ echo -e 'aB\nBa\ncc\nff\nGg' | egrep '^[a-z]'
aB
cc
ff
[gwozniak@nb-gwozniak-lin ~]$ echo -e 'aB\nBa\ncc\nff\nGg'|egrep '^[[:lower:]]' 
                                                                          
aB                                                                              
                                                                            
cc                                                                              
                                                                            
ff                                                                              
                                                                            





-- 
Best regards,
Grzegorz Woźniak

Reply via email to