Re: Grep Guru

2008-06-11 Thread Ian Smith
On Mon, 9 Jun 2008, Giorgos Keramidas wrote: On Tue, 10 Jun 2008 01:44:36 +1000 (EST), Ian Smith [EMAIL PROTECTED] wrote: On Sun, 8 Jun 2008 16:07:12 -0700 Bill Campbell [EMAIL PROTECTED] wrote: On Mon, Jun 09, 2008, Raphael Becker wrote: On Sun, Jun 08, 2008 at 10:15:50PM +0200,

Re: Grep Guru

2008-06-09 Thread Giorgos Keramidas
On Sun, 8 Jun 2008 16:07:12 -0700, Bill Campbell [EMAIL PROTECTED] wrote: On Mon, Jun 09, 2008, Raphael Becker wrote: On Sun, Jun 08, 2008 at 10:15:50PM +0200, Wojciech Puchar wrote: find . -type f -print0|xargs -0 grep grepoptions text to search There's no more need for find | xargs Try:

Re: Grep Guru

2008-06-09 Thread Giorgos Keramidas
and reporting them. Is there a Grep Guru who can hint me out? Thanks, I expect you need something like: find . -type f -print0 | xargs -0 grep pattern Or install the GNU grep (from the man) -R, -r, --recursive Read all files under each directory, recursively; this is equivalent

Re: Grep Guru

2008-06-09 Thread Ian Smith
On Sun, 8 Jun 2008 16:07:12 -0700 Bill Campbell [EMAIL PROTECTED] wrote: On Mon, Jun 09, 2008, Raphael Becker wrote: On Sun, Jun 08, 2008 at 10:15:50PM +0200, Wojciech Puchar wrote: find . -type f -print0|xargs -0 grep grepoptions text to search There's no more need for find | xargs

Re: Grep Guru

2008-06-09 Thread Giorgos Keramidas
On Tue, 10 Jun 2008 01:44:36 +1000 (EST), Ian Smith [EMAIL PROTECTED] wrote: On Sun, 8 Jun 2008 16:07:12 -0700 Bill Campbell [EMAIL PROTECTED] wrote: On Mon, Jun 09, 2008, Raphael Becker wrote: On Sun, Jun 08, 2008 at 10:15:50PM +0200, Wojciech Puchar wrote: find . -type f -print0|xargs -0 grep

Grep Guru

2008-06-08 Thread Jos Chrispijn
I tried to make a grep script on find a string in all files on path ./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint me out? Thanks, -- Jos ___ freebsd-questions@freebsd.org mailing list http

Re: Grep Guru

2008-06-08 Thread Bill Campbell
On Sun, Jun 08, 2008, Jos Chrispijn wrote: I tried to make a grep script on find a string in all files on path ./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint me out? Thanks, I expect you need something like: find . -type f -print0

Re: Grep Guru

2008-06-08 Thread Wojciech Puchar
I tried to make a grep script on find a string in all files on path ./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint me out? Thanks, find . -type f -print0|xargs -0 grep grepoptions text to search anyway it's nothing about being Grep

Re: Grep Guru

2008-06-08 Thread Simon Jolle sjolle
On 06/08/2008 10:12 PM, Bill Campbell wrote: On Sun, Jun 08, 2008, Jos Chrispijn wrote: I tried to make a grep script on find a string in all files on path ./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint me out? Thanks, I expect

Re: Grep Guru

2008-06-08 Thread Matthew Seaman
Simon Jolle sjolle wrote: On 06/08/2008 10:12 PM, Bill Campbell wrote: On Sun, Jun 08, 2008, Jos Chrispijn wrote: I tried to make a grep script on find a string in all files on path ./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint me

Re: Grep Guru

2008-06-08 Thread Paul Procacci
Jos Chrispijn wrote: I tried to make a grep script on find a string in all files on path ./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint me out? Thanks, -- Jos ___ freebsd-questions

Re: Grep Guru

2008-06-08 Thread Frank Shute
and reporting them. Is there a Grep Guru who can hint me out? Thanks, I expect you need something like: find . -type f -print0 | xargs -0 grep pattern Or install the GNU grep (from the man) -R, -r, --recursive Read all files under each directory, recursively; this is equivalent

Re: Grep Guru

2008-06-08 Thread Paul Schmehl
--On June 8, 2008 1:12:56 PM -0700 Bill Campbell [EMAIL PROTECTED] wrote: On Sun, Jun 08, 2008, Jos Chrispijn wrote: I tried to make a grep script on find a string in all files on path ./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint

Re: Grep Guru

2008-06-08 Thread Frank Shute
./ and down. It does anything exept searching in files and reporting them. Is there a Grep Guru who can hint me out? Thanks, I expect you need something like: find . -type f -print0 | xargs -0 grep pattern Or install the GNU grep (from the man) -R, -r, --recursive

Re: Grep Guru

2008-06-08 Thread Simon Jolle sjolle
On 06/08/2008 10:26 PM, Matthew Seaman wrote: The system supplied grep(1) /is/ gnu grep: happy-idiot-talk:~:% grep --version grep (GNU grep) 2.5.1-FreeBSD [...] Sorry you are right. I didn't had any FreeBSD box around. Cheers, Matthew cheers Simon signature.asc Description:

Re: Grep Guru

2008-06-08 Thread Raphael Becker
On Sun, Jun 08, 2008 at 10:15:50PM +0200, Wojciech Puchar wrote: find . -type f -print0|xargs -0 grep grepoptions text to search There's no more need for find | xargs Try: find . -type -f -exec grep grepoptions text to search {} \+ -exec foo {} \+ behaves like xargs foo -exec foo {} \;

Re: Grep Guru

2008-06-08 Thread Bill Campbell
On Mon, Jun 09, 2008, Raphael Becker wrote: On Sun, Jun 08, 2008 at 10:15:50PM +0200, Wojciech Puchar wrote: find . -type f -print0|xargs -0 grep grepoptions text to search There's no more need for find | xargs Try: find . -type -f -exec grep grepoptions text to search {} \+ -exec foo {} \+

Re: Grep Guru

2008-06-08 Thread Jeffrey Goldberg
On Jun 8, 2008, at 5:50 PM, Raphael Becker wrote: find . -type -f -exec grep grepoptions text to search {} \+ -exec foo {} \+ behaves like xargs foo -exec foo {} \; exec foo for every file Way cool! I hadn't known that about find(1). Cheers, -j