Afficher un message
Vieux 15/03/2008, 18h32   #1
dave_140390@hotmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut weird behavior of grep

Hi,

I have a file that contains two lines of text:
small line
LARGE LINE

Let's call this file "test".

When I grep this file for "a", I get, as expected:
$ grep a test
small line

When I grep this file for "A", I get, as expected:
$ grep A test
LARGE LINE

Now, if I grep this file for [a-z], I get:
$ grep [a-z] test
small line
LARGE LINE

Now, _that_ is unexpected! Why on earth does grep return also the line
with only capital letters when the expression to search is "[a-z]"?!
Let me add that my environment variable GREP_OPTIONS is not set.

Any idea?

-- dave
  Réponse avec citation
 
Page generated in 0,04534 seconds with 9 queries