delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/14/07:34:26

Date: Tue, 14 Oct 1997 13:33:02 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: eyal DOT ben-david AT aks DOT com
cc: djgpp AT delorie DOT com
Subject: Re: ANNOUNCE: Grep 2.1 uploaded
In-Reply-To: <42256530.003743EC.00@aks.com>
Message-ID: <Pine.SUN.3.91.971014132758.14821A-100000@is>
MIME-Version: 1.0

On Tue, 14 Oct 1997 eyal DOT ben-david AT aks DOT com wrote:

> Apropos grep,  I didn't find an option for 'grepping' also in
> subdirectories.
> Do I have to specify the dirs in the command line ?

On Unix, yes.  But DJGPP has a hidden treasure in its filename-globbing 
code: the special wilcard "..." recursively expands to all of the 
subdirectories.  So, e.g., "grep go32 c:/djgpp/include/.../*.h" will find 
all the instances of "go32" in all the DJGPP header files.

> Is there any tool that does it  (with or without grep) ?

On Unix, the usual way is to say something like "find . -exec grep ...".

If you need to search files written is some programming language, a
better tool is `lid' from GNU ID-utils (v2gnu/idu32b.zip).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019