Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA00861; Tue, 23 Jan 96 03:30:31 EST
Received: from halloran-eldar.lcs.mit.edu by MIT.EDU with SMTP
	id AA01924; Tue, 23 Jan 96 03:30:28 EST
Received: from freefall.FreeBSD.ORG by halloran-eldar.lcs.mit.edu; (5.65/1.1.8.2/19Aug95-0530PM)
	id AA31717; Tue, 23 Jan 1996 03:27:59 -0500
Received: from localhost (daemon@localhost)
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id RAA11060
          Mon, 22 Jan 1996 17:32:34 -0800 (PST)
Received: (from root@localhost)
          by freefall.freebsd.org (8.7.3/8.7.3) id RAA11005
          for hackers-outgoing; Mon, 22 Jan 1996 17:32:07 -0800 (PST)
Received: from wdl1.wdl.loral.com (wdl1.wdl.loral.com [137.249.32.1])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id RAA10956
          for <hackers@freebsd.org>; Mon, 22 Jan 1996 17:31:58 -0800 (PST)
Received: from miles.sso.loral.com (miles.wdl.loral.com) by wdl1.wdl.loral.com (5.x/WDL-2.4-1.0)
	id AA15520; Mon, 22 Jan 1996 17:29:55 -0800
Received: by miles.sso.loral.com (4.1/SSO-SUN-2.04)
	id AA26759; Mon, 22 Jan 96 20:29:05 EST
Date: Mon, 22 Jan 1996 20:29:04 -0500 (EST)
From: Richard Toren <rpt@miles.sso.loral.com>
X-Sender: rpt@miles
To: hackers@freebsd.org
Subject: Re: recursive grep 
In-Reply-To: <199601222354.QAA01113@rover.village.org>
Message-Id: <Pine.SUN.3.91.960122201441.26644A-100000@miles>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-hackers@freebsd.org
Precedence: bulk

If you search the web under 'threads', you will eventually find a 
SunMicroSys location that has a number of examples of threaded code. One 
of these examples a 'tgrep' which is a multi-threaded grep. It is used as 
a testbed for different threading implementations.
  This might be a good test for the people who want to put in kernel 
threads. There is also a set of files there that convert POSIX threads to 
Solaris threads.

---from the README ----
Utility: tgrep (threaded recursive grep)
Author:  Ron Winacott 
Email:   ronw@canada.sun.com
Phone:   (905) 477-0437 X 340 Or (1-800) 363-6200
Fax:     (905) 477-0217
Address: 140 Renfrew Drive, 
         Suite #206,
         Markham Ontario,
         Canada. L3R 6B3
Group:   Developers Support Center (SMCC) OpCom.


*Introduction.
        
Tgrep is a multi-threaded version of grep. Tgrep supports all but the
-w (word search) options of the normal grep command, and a few options
that are only avaliable to tgrep. The real change from grep, is that
tgrep will recurse down through sub-directories and search all files
for the target string. Tgrep searches files like the following command:
-------------------------------

                         ====================================================
Rip Toren               | The bad news is that C++ is not an object-oriented |
rpt@miles.sso.loral.com | programming language. .... The good news is that   |
                        | C++ supports object-oriented programming.          |
                        |    C++ Programming & Fundamental Concepts          |
                        |     by Anderson & Heinze                           |
                         ====================================================
On Mon, 22 Jan 1996, Warner Losh wrote:

> : I would like add options for recursive searching 
> : (grep -R foo /usr/include). 
> 
> find /usr/local | xargs grep foo
> 
> Why do we need another wart on grep?  Especially when what you may
> want is find /usr/local -name \*f.h | xargs grep foo :-)
> 
> Warner
> 
