From: Nikola Milutinovic <Nikola.Milutinovic () ev ! co ! yu>
To: tru64-unix-managers
Subject: Grep ?
Date: Mon, 05 Feb 2001 16:56:03 +0000 [thread overview]
Message-ID: <98139226612092.tru64-unix-managers.marc@archive.invalid> (raw)
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.
reply other threads:[~2001-02-05 16:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox