From owner-freebsd-questions@FreeBSD.ORG Mon Apr 5 01:14:34 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38576106566B for ; Mon, 5 Apr 2010 01:14:34 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (ns2.r-bonomi.com [204.87.227.129]) by mx1.freebsd.org (Postfix) with ESMTP id E2F668FC13 for ; Mon, 5 Apr 2010 01:14:33 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.3/rdb1) id o351ELJx016272; Sun, 4 Apr 2010 20:14:21 -0500 (CDT) Date: Sun, 4 Apr 2010 20:14:21 -0500 (CDT) From: Robert Bonomi Message-Id: <201004050114.o351ELJx016272@mail.r-bonomi.com> To: freebsd-questions@freebsd.org, glarkin@freebsd.org, kline@thought.org, merlyn@stonehenge.com Cc: Subject: Re: perl qstn... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 01:14:34 -0000 > From owner-freebsd-questions@freebsd.org Sun Apr 4 17:14:17 2010 > Date: Sun, 4 Apr 2010 15:13:49 -0700 > From: Gary Kline > To: "Randal L. Schwartz" , glarkin@freebsd.org, > FreeBSD Mailing List > Cc: > Subject: Re: perl qstn... > > On Sun, Apr 04, 2010 at 10:58:35AM -1000, parv@pair.com wrote: > > in message <20100404203951.GB47459@thought.org>, > > wrote Gary Kline thusly... > > > > > > ---Maybe you can clue me in on this one: around a dozen years ago > > > i somw found a recursive grep named tgrep online. to save tying, > > > i renamed it "rgr". i can start anywhere and 'rgr pattern' > > > --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or > > > tarballs or compressed files. given this, rgr has become my > > > favorite utility, but since it doesn't have All of grep's > > > options, yes, it's tru e, there are times whrn i have to use the > > > real thing. i have searched for tgrep and cannot find a newer > > > more complete version. would you or anyone reading this know > > > where an upgraded version is? > > > > > > Here is the Usage string: > > > > > > p4 13:07 [5524] rgr > > > Usage: tgrep [-iredblLnf] regexp filepat ... > > > tgrep -h for help > > > > > > > > > if not for trgep/rgr my shoulder would've fallen off and just > > > laid on the floor; that's how much i use this script. having the > > > 'w' switch would be nice, so would the -N switch. > > > > What does "-N" do in grep included with FreeBSD? My version > > (FreeBSD 8) only has "-n". > > > Sorry, my bad. I should have said that "N" was any positive > integer. Sometimes I'll be searching for a phrase that i'm > not certain of and will type grep -7 PATTERN file[s] where > PATTERN is a known. I'll pipe around for various other > strings. > > > > I know of one tcgrep (by Tom Christiansen) ... > > > > http://www.perl.com/CPAN/authors/id/TOMC/scripts/tcgrep.gz > > > > > > Then, there is ack ... > > > > http://search.cpan.org/dist/ack/ack > > > > > > ... may need to tinker with option to search non-Perl files (see -a > > option). > > > > Or, simply ... > > > > #!/bin/sh > > > > # If your particular egrep is laced with potent PCRE, may use -P > > # option (before "$@") to specify Perl regex. > > egrep -r $@ . > > > > > this tgrep is from the NL; by a Prof Piet van Oostrum and is > dated 5/19/93. i think ii wrote this fellow many years ago. > Zip. I'll ck out ack when i'm using a gui mailer, thanks. Google to the rescue. Given the program name, and the author, one finds that this code was in "UNIX Power Tools" (O'Reilly * Assoc.)