Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Paragraph grep: request for testing, comments and feedbacks

by siberia-man (Friar)
on Nov 27, 2017 at 00:09 UTC ( [id://1204300]=note: print w/replies, xml ) Need Help??


in reply to Paragraph grep: request for testing, comments and feedbacks

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 :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1204300]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-24 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found