From owner-freebsd-hackers Mon Jan 22 17:32:07 1996 Return-Path: owner-hackers 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 ; 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 X-Sender: rpt@miles To: hackers@freebsd.org Subject: Re: recursive grep In-Reply-To: <199601222354.QAA01113@rover.village.org> Message-Id: 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 >