Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37DFC5C5.192B3C3D@comco.com> Date: Wed, 15 Sep 1999 11:13:57 -0500 From: Tadeusz Liszka Organization: Computational Mechanics, Inc. X-Mailer: Mozilla 4.07 [en] (X11; U; IRIX 5.3 IP22) MIME-Version: 1.0 To: bsimon AT ctam DOT com DOT au CC: CygWin32 Subject: Re: recursive grep References: <006701befee8$71f51ef0$effcf584 AT rtp-cbjones DOT corpeast DOT baynetworks DOT com> <37DEED87 DOT 47F98EE1 AT ctam DOT com DOT au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Brendan Simon wrote: > > Christopher Jones wrote: > > > > The UNIXy way to do this is > > > > > > find | xargs grep > > > This is the proper way > > > > or find -exec grep \{\} \; -print > > > > proving once again there is more than one way to do just about anything. This one will not list file names when match is found > > I use > grep pattern `find` > or > grep pattern `find . -name "*.c"` > > This sometimes can fill the command line up though for large file matches. The xargs above is exactly to avoid line overflow ================ I have following aliases in my .tcshrc. Make your own to taste: alias findc 'find . -type f -name \*.\[cC\]\* -print | xargs grep' alias findf ..... "findc " searches for pattern in all source files in the subtree, skipping softlinks. > > Brendan Simon. > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Tadeusz :: The public opinion should be alarmed by its own nonexistence :: (512)467-0618 ext. 526 :: Stanislaw J. Lec, trans. TJL -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com