emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile.el::grep-program - should it use egrep instead of grep?


From: Jari Aalto
Subject: Re: compile.el::grep-program - should it use egrep instead of grep?
Date: Mon, 12 Sep 2005 18:58:52 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.3 (windows-nt)

Andreas Schwab <address@hidden> writes:

| Jari Aalto <address@hidden> writes:
| 
| > Could you elaborate a little. The syntax of grep is not sufficient to
| > make daily searches with M-x find-dired or M-x grep-find that happen
| > frequently during searching system log files or looking into program
| > and text document files.
| 
| In GNU grep there is no expressive difference between BREs and EREs, only
| the syntax differs.

     $ grep --version
     grep (GNU grep) 2.5.1

     $ echo -e "this\nthat" |  grep '(this|that)'
     <nothing>

I assume you meant that the OS's grep binary package installs wrappers
around the grep(1) programs to call it with various arguments. However
all the systems do define egrep(1) which use ERE syntaxes, so the
appropriate call would always be even in GNU system:

     $ echo -e "this\nthat" | egrep '(this|that)'
     this 
     that

It's true that W32 can't use egrep shell script - But in the other
hand it's not GNU system. And, 99% of the Emacs who need *nix features
will install Cygwin, which can use the egrep(1) shell wrapper and
other utilities like cvs, svn, diff, etc.

Jari









reply via email to

[Prev in Thread] Current Thread [Next in Thread]