Re: Seeking a grep-like script

2010-06-24 Thread Dave Cross
On 10 June 2010 14:26, Bill Davidsen wrote: > Timothy Murphy wrote: >> >> I'm looking for a grep-like script that searches for a given word, >> and returns the paragraphs in which it appears (rather than the lines), >> where a paragraph is defined as the material between 2 blank lines. >> >> All s

Re: Seeking a grep-like script

2010-06-10 Thread Timothy Murphy
Bill Davidsen wrote: >> I'm looking for a grep-like script that searches for a given word, >> and returns the paragraphs in which it appears (rather than the lines), >> where a paragraph is defined as the material between 2 blank lines. > If by "looking for" you mean finding a script which does y

Re: Seeking a grep-like script

2010-06-10 Thread Bill Davidsen
Timothy Murphy wrote: I'm looking for a grep-like script that searches for a given word, and returns the paragraphs in which it appears (rather than the lines), where a paragraph is defined as the material between 2 blank lines. All suggestions gratefully received. It would be relatively easy t

Re: Seeking a grep-like script

2010-06-10 Thread Dave Mitchell
On Thu, Jun 10, 2010 at 01:36:07PM +0100, Timothy Murphy wrote: > I'm looking for a grep-like script that searches for a given word, > and returns the paragraphs in which it appears (rather than the lines), > where a paragraph is defined as the material between 2 blank lines. perl -ne 'BEGIN { $/=

Seeking a grep-like script

2010-06-10 Thread Timothy Murphy
I'm looking for a grep-like script that searches for a given word, and returns the paragraphs in which it appears (rather than the lines), where a paragraph is defined as the material between 2 blank lines. All suggestions gratefully received. -- Timothy Murphy e-mail: gayleard /at/ eircom.net