The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
pipe broken abir2 UNIX and Linux Applications 1 12-27-2007 12:40 AM
pipe broken abir2 Linux 2 12-26-2007 09:48 PM
broken pipe? gusla UNIX for Dummies Questions & Answers 3 05-12-2002 02:05 AM
Broken ollyparkhouse UNIX for Advanced & Expert Users 3 10-17-2001 05:20 AM
Broken pipe with TAR falberti UNIX for Dummies Questions & Answers 1 10-08-2001 07:54 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-14-2006
Registered User
 

Join Date: Apr 2006
Posts: 24
is grep -i broken?

Is grep -i (case insensitive) broken? If not, can someone explain to me why the third grep fails with no output?
Code:
$ echo DBI DBH | grep DB[IH]
DBI DBH

$ echo dbi dbh | grep -i 'DB[IH]'
dbi dbh

$ echo DBI DBH | grep -i DB[IH]

$ grep --version
grep (GNU grep) 2.5.1

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
Dies ist freie Software; in den Quellen befinden sich die Lizenzbedingungen.
Es gibt KEINERLEI Garantie; nicht einmal für die TAUGLICHKEIT oder
VERWENDBARKEIT FÃR EINEN BESTIMMTEN ZWECK.

Last edited by tphyahoo; 07-14-2006 at 04:08 AM.
Reply With Quote
Forum Sponsor
  #2  
Old 07-14-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,683
Interesting. It works fine for me.

Code:
[/tmp]$ echo DBI DBH | grep  DB[IH]
DBI DBH
[/tmp]$ echo DBI DBH | grep -i  DB[IH]
DBI DBH
[/tmp]$ 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.

[/tmp]$
Reply With Quote
  #3  
Old 07-14-2006
Registered User
 

Join Date: Apr 2006
Posts: 24
oh this is ugly. I figured out why though.

$ echo DBI DBH | grep -i DB[IH]
$ env | grep LANG
LANG=de_DE.UTF-8
$ LANG=de_DE.ISO-8859-1
$ echo DBI DBH | grep -i DB[IH]
DBI DBH
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0