Python Forum
Command wanted in Python: mgrep - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: Command wanted in Python: mgrep (/thread-8910.html)



Command wanted in Python: mgrep - Skaperen - Mar-13-2018

what mgrep should do is take a grep argument that has line separators, and search the specified file(s) (or stdin if no files specified) for a match of the group of lines as a group. i also want the context output options -A, -B, and -C and the list option -l and the number option -n. suppose i search for foo\nbar. lots of files have lots of lines with foo. but none of those will match unless the line that follows has bar.


RE: Command wanted in Python: mgrep - Gribouillis - Mar-13-2018

You want to compare your requirements with grin3's features. There are also many other results for 'grep' in pypi.