How to Write grep in Emacs Lisp (tutorial)

Petter Gustad newsmailcomp6 at gustad.com
Tue Feb 8 12:55:45 EST 2011


Icarus Sparry <i.sparry+un at gmail.com> writes:

> The 'modern' way to do this is
> find . -maxdepth 2 -name '*.html' -exec grep whatever {} +

Agree, I've noticed that recent version of find have the + option. I
remember in the old days the exec method was considered bad since it
would fork grep for each process, so I've got used to using xargs. I
always used to quote "{}" as well, but this does not seem to be
required in later versions of find.

In terms of the number of forks the above will be similar to xargs as
they both have to make sure that they don't overflow the command
length.


Petter
-- 
.sig removed by request. 



More information about the Python-list mailing list