How to Write grep in Emacs Lisp (tutorial)

Thomas L. Shinnick tshinnic at io.com
Thu Feb 10 05:24:04 CET 2011


At 09:39 PM 2/9/2011, Rob Warnock wrote:
>Harald Hanche-Olsen  <hanche at math.ntnu.no> wrote:
[snip]
>Years & years ago, right after I learned about "xargs", I got burned
>several times on "find | xargs grep pat" when the file list was long
>enough that "xargs" fired up more than one "grep"... and the last
>invocation was given only one arg!! IT FOUND THE PATTERN, BUT DIDN'T
>TELL ME WHAT !@^%!$@#@! FILE IT WAS IN!!  :-{
>
>The trailing "/dev/null" fixes that.  ;-}

I find that I need periodic review of the grep  -l  -L  -h  and  -H 
options .  I'm surprised when other people forget about these 
too.  The  -H  option is your heart's desire.

>-Rob
>
>-----
>Rob Warnock                     <rpw3 at rpw3.org>
>627 26th Avenue                 <URL:http://rpw3.org/>
>San Mateo, CA 94403             (650)572-2607




More information about the Python-list mailing list