is grep -i broken?


 
Thread Tools Search this Thread
Operating Systems Linux is grep -i broken?
# 1  
Old 07-14-2006
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 08:08 AM..
# 2  
Old 07-14-2006
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]$

# 3  
Old 07-14-2006
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
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Close broken lv ?

Hello, Due to disk failure I lost certain lv. Before running reducevg I'm trying to remove lv by using rmlv: 0516-1008 rmlv: Logical volume xxx must be closed. If the logical volume contains a filesystem, the umount command will close the LV device. lv is still open: # lslv xxx... (1 Reply)
Discussion started by: vilius
1 Replies

2. AIX

Please help: workstation broken?

I have buy an used Workstation intellistation power5 IBM. But doesn't work. How to turn on? I try to connect network asmi take the ip ping is ok telnet ok but if i try to connect to a browser give me timeout The display give me a yellow sign ! and error B150F22A Someone can help... (2 Replies)
Discussion started by: Linusolaradm1
2 Replies

3. UNIX for Dummies Questions & Answers

Broken raid

Hello, I have 2 servers with broken raid 1, but each one gives me a different error, I dont know what is the difference. # cat /proc/mdstat Personalities : md0 : active raid1 sdb1(F) sda1 2102464 blocks md1 : active raid1 sdb2(F) sda2 264960 blocks md2 : active... (3 Replies)
Discussion started by: MaRiOsGR
3 Replies

4. Solaris

Broken Disks (?)

Hello Folks, I´m a New Unix admin (by forceps) and I got a warning from one server saying: Solaris Volume Manager: hostnamehere: metacheck: Report: Mon May 14 18:45:00 BRT 2012 -------------------------------------------------------------- metacheck: metadb problem, for more detail run: ... (2 Replies)
Discussion started by: pxb368@motorola
2 Replies

5. Shell Programming and Scripting

one file broken down into two

Hi, I guess the common theme for command lines is to take what you want out of a file and put it into another file. I am wondering if there are ways of putting what you dont want into a file aswell. so heres an example: 1 3 4 5 7 8 so if i use this code, I get values above 7 and... (2 Replies)
Discussion started by: phil_heath
2 Replies

6. Shell Programming and Scripting

broken pipe

hi i am trying to upload a file using ftp protocol, i am facing some problem while uploading "Failedtoupload:SFTREGUP1:FTP_ASCII_MAILBOX21.39.10.856305000:Broken pipe" Can someone explain why it is coming , and the solution . (0 Replies)
Discussion started by: Satyak
0 Replies

7. UNIX and Linux Applications

pipe broken

hi i have a server, and i have a web site and i installed apache in the /usr/local/apache/logs i have a file and i have this problem (32)Broken pipe: core_output_filter: writing data to the network plz help me how i can resolve this plz it's urgent th (1 Reply)
Discussion started by: abir2
1 Replies

8. UNIX for Dummies Questions & Answers

broken pipe

sometimes I ftp files from an Unix environment from the command prompt of my win2000 pc and I get a "broken pipe" message. sometimes I'll get nothing but sometimes I'll get part of the file. Whats this "broken pipe" about?? (3 Replies)
Discussion started by: eloquent99
3 Replies

9. UNIX for Advanced & Expert Users

Broken

Ok i am running Linux, or rather was. I can not longer do anything. This was a dns server amoungst other things. It will no longer boot. I have used a startup disk, but how can i recover the OS? I need help and urgently. Please someone thanks (3 Replies)
Discussion started by: ollyparkhouse
3 Replies
Login or Register to Ask a Question