grep by paragraph
poma
pomidorabelisima at gmail.com
Fri Aug 30 17:36:46 UTC 2013
On 30.08.2013 13:39, Andrew wrote:
> Hi Timothy,
>>> Is there an option for grep, or some similar program,
>>> that will print out a whole paragraph -
>>> defined as the section between two blank lines -
>>> containing a given word or phrase?
>>>
>>> Such as the above 4 lines.
>>> If not, can anyone suggest a simple script that will do this?
>>>
>
>
> AIX has grep -p for just this purpose, I wish GNU grep did too.
>
> I share your pain.
>
> Regards,
> Andrew.
>
I share your enthusiasm. :)
$ paragrep enthusiasm enthusiasm.txt
I share your enthusiasm. :)
poma
-------------- next part --------------
On 30.08.2013 13:39, Andrew wrote:> Hi Timothy,
>>> Is there an option for grep, or some similar program,
>>> that will print out a whole paragraph -
>>> defined as the section between two blank lines -
>>> containing a given word or phrase?
>>>
>>> Such as the above 4 lines.
>>> If not, can anyone suggest a simple script that will do this?
> AIX has grep -p for just this purpose, I wish GNU grep did too.
>
> I share your pain.
>
> Regards,
> Andrew.
I share your enthusiasm. :)
poma
More information about the users
mailing list