Hi all.
This might be quick. My question is about "grep -E". What is the proper way of
grouping phrases?
Man pages state that if you want to use "()" to group things, they have to be
escaped! I have tried with escaping and without. It works without, contrary to
man pages!!!
FWIW, it would make sense not to escape special symbols if you want to use them
as specials and TO escape them if you want to use them as ordinary characters.
Digital UNIX 4.0F
IE: grep -E "(^.*\.so\.ev\.co\.yu)|(^192\.168\.1((5[89])|(6[01234])))"
wwwaccess.log
was working as expected, selecting all lines that began with:
*.so.ev.co.yu
192.168.158.*
...
192.168.164.*
Somebody told me that on Linux he had to escape ().
What is the verdict?
Nix.
Received on Mon Feb 05 2001 - 16:58:03 NZDT