In continuation of this thread I am happy to say that I improved and extended the script. The new options --file=FILE, --or and --and are shipped with new version. In accordance of the script description they work as follows:

-f FILE, --file=FILE

Obtain patterns from FILE, one per line.

-A, --and, -O, --or

These options specify whether multiple search patterns specified by the -e options should be logically ANDed together or logically ORed together. If not specified, the patterns are assumed logically ORed. These options can be used to simplify the commands searching for matches to multiple patterns. More than one of them can be specified but the only last pattern has affect.

The following example shows how the combining option simplifies usage. The resulting output will consist of the paragraphs matching both PATTERN1 and PATTERN2.
cat FILENAME | paragrep -e PATTERN1 -e PATTERN2 -A cat FILENAME | paragrep -e PATTERN1 | paragrep -e PATTERN2
Welcome for meditations, Monks :)

In reply to Re: Paragraph grep: request for testing, comments and feedbacks by siberia-man
in thread Paragraph grep: request for testing, comments and feedbacks by siberia-man

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.