[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grep / strange behaviour of -i in conjunction with -o
From: |
websafe |
Subject: |
grep / strange behaviour of -i in conjunction with -o |
Date: |
Thu, 20 Jul 2006 20:50:47 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (X11/20060516) |
Hello,
I'm using grep (GNU grep) 2.5 on Linux Slackware 10.2.
I've noticed the following:
---------------------------------------------------------------------------
# echo "blah blah http://zupa.InFo blah" \
| grep -E "((http|ftp)[s]?)://([a-zA-Z0-9\.\-]*\.){1,}(info)"
## returns NOTHING, as expected. OK.
---------------------------------------------------------------------------
Next (added -i)
# echo "blah blah http://zupa.InFo blah" \
| grep -i -E "((http|ftp)[s]?)://([a-zA-Z0-9\.\-]*\.){1,}(info)"
## returns, as expected:
blah blah http://zupa.InFo blah
---------------------------------------------------------------------------
BUT (added -o):
# echo "blah blah http://zupa.InFo blah" \
| grep -i -o -E "((http|ftp)[s]?)://([a-zA-Z0-9\.\-]*\.){1,}(info)"
# returns NOTHING, but I've expected to see "http://zupa.InFo" as the result.
---------------------------------------------------------------------------
It seems, that in conjuction with -o the option -i gets "turned off"
or sth. Am I thinking wrong or is this some kind of bug/feature? ;-)
Kind regards
websafe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- grep / strange behaviour of -i in conjunction with -o,
websafe <=