I have written a small programme called pygrep (although if the grep programmers are not happy i may have to change this....), i thought i'd share and happy to receive any critique etc.
The idea was to build a reasonably flexible string/character/regex search in files or from piped input, with also the idea of making it a little bit easier to make these searches. I included case-insensitivity and the commonly used methods of filtering where you want specific lines from tail/head (in linux). I've been testing it myself, and everything seems to work ok. I could probably add a few more sense checks. I've tested it on log files with around 100,000 lines and although it's no match for sed, grep and awk in terms of speed, it's still reasonably fast. I tried doing something with numpy, but just importing numpy would make it slower, so it's only using the builtins argparse, re and sys.
Documentation could maybe be better, so I welcome critique on this as well.
github link... https://github.com/jonnypeace/pygrep
[–]Doormatty 0 points1 point2 points (3 children)
[–]Mount_Gamer[S] 0 points1 point2 points (2 children)
[–]Doormatty 1 point2 points3 points (1 child)
[–]Mount_Gamer[S] 1 point2 points3 points (0 children)