To display entire blocks of text
which contain a certain pattern,
this one-liner can be used:
cat file | perl -e "$/=''; while (<>) {print if /pattern/)}"
Of course, this can be put in a
perl-script pgrep:
#!/bin/perl
$/='';
while (<>)
{print if /pattern/)}
This tip generously supported by: hmthage@wanadoo.nl
NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted
by various unix admins around the globe. UGU suggest you read and
test each tip in a non-volitile environment before placing into
production.