Finding words in paragraphs

Doug Gwyn gwyn at smoke.BRL.MIL
Tue Jul 18 04:00:53 AEST 1989


In article <8421 at batcomputer.tn.cornell.edu> lacey at tcgould.tn.cornell.edu (John Lacey) writes:
>Awk is what you want in this case.  Try something like this:
>	awk 'BEGIN { FS = ""; RS = "\n"} /the-word-here/' the-filename-here

$ awk 'BEGIN { FS = ""; RS = "\n"} /test/' > foo
This isn't it.
Try again.

The requirement is to print the whole paragraph.
This is a test.
End of paragraph.

Done.
^D
$ cat foo
This is a test.
$ 



More information about the Comp.unix.questions mailing list