[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep problem with -io, v 2.5.1
From: |
Brian Craft |
Subject: |
grep problem with -io, v 2.5.1 |
Date: |
Wed, 7 Apr 2004 11:29:29 -0700 |
User-agent: |
Mutt/1.4.1i |
This looks fishy to me, with grep 2.5.1:
porky 32 /home/bcboy> echo foo | grep -io foo
foo
porky 33 /home/bcboy> echo foo | grep -io Foo
porky 34 /home/bcboy> echo foo | grep -i Foo
foo
porky 35 /home/bcboy> echo foo | grep -o Foo
porky 36 /home/bcboy> echo foo | grep -io Foo
porky 37 /home/bcboy> echo Foo | grep -io Foo
porky 38 /home/bcboy> echo Foo | grep -io foo
foo
32 is ok
33 looks wrong. Case is not ignored.
34 is ok and verifies the match with -i when -o is not used.
35 is ok
36 repeats 33, still wrong
37 looks wrong. That should be a match with or without -i
38 is ok
It looks like the match in pseudocode reads something like
if (lowercase(target) == pattern) output(lowercase(target))
while it should be (as I understand the docs)
if (lowercase(target) == lowercase(pattern)) ouput(target)
b.c.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep problem with -io, v 2.5.1,
Brian Craft <=