Re: My own "grep" command ?

[email protected] (Nickolay Pakoulin) Fri, 13 Feb 2004 15:35:17 +0300
Newsgroups gmane.emacs.xemacs.general
Message-ID <[email protected]>
Hello, Markus!

Have a look at `grep-find' command.  By default it runs the following:

find . -type f -print0 | xargs -0 -e grep -n 

There are also commands `grep-all-files-in-current-directory' and
`grep-all-files-in-current-directory-and-below'.

Our you can define your own command string for grep in user variable
`grep-command'.  Either via `customize-variable' or explicitly setting it in
you init file.  Say,

(setq grep-command "find . -type f -exec grep -Hn {} \\;")

Nick.

intro: "MG" == Markus Grunwald <[email protected]> writes:

  MG> Hello, I wanted to mage my own "grep" command. Instead of

  MG> "Run grep (like this): grep -n ..."

  MG> I would like to grep through subdirs:

  MG> "Run grep (like this): find . -type f -exec grep -Hn {} \;"

  MG> To do this, I wantet to have a look at the grep lisp-sourcecode, but I
  MG> don't know where it is. Can you help me (or do you allready have such a
  MG> function) ?


  MG> BTW: Is there a way to stop a long running grep ?

  MG> TIA, Markus Grunwald Softwareentwicklung

  MG> PRÜFTECHNIK Condition Monitoring GmbH Oskar-Messter-Straße 19-21 85737
  MG> Ismaning www.pruftechnik.com Tel: +49 (0)89 99616177 Fax: +49 (0)89
  MG> 99616200