From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <98139226612092.tru64-unix-managers.marc@archive.invalid> From: Nikola Milutinovic Date: Mon, 05 Feb 2001 16:56:03 +0000 To: tru64-unix-managers Subject: Grep ? X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=98139226612092 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.