Python Forum
2 forms of this tool grep command
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2 forms of this tool grep command
this is a command i have needed a few times today, so i decided that maybe i should create it.

it is like a grep command, which reads a main file line-by-line (or stdin) and each current line is considered to match if any line of a pattern file is seen as a substring of the current line of the main file. my curiosity is if anyone here would code this (if they were coding this) using the "re" module even when the pattern file does not contain regular expressions. i can envision at least 2 forms of this tool where in one, each line of the pattern file is a regular expression (like in egrep), and in the other, each line of the pattern file is a fixed substring (like in fgrep).

i am not looking for someone else to code this, but if this existed as a complete project before this post, i would like to at least download it to check it out.

Possibly Related Threads…
Thread Author Replies Views Last Post
  difference between forms of input a list to function akbarza 6 815 Feb-21-2024, 08:02 PM
Last Post: bterwijn
  use subprocess on linux\pi wwith a "grep " command korenron 2 7,628 Oct-19-2021, 10:52 AM
Last Post: DeaD_EyE
  How to grep corresponding value in another df Mekala 2 1,785 Oct-13-2020, 02:52 PM
Last Post: Mekala
  grep value files enigma619 0 1,459 Mar-04-2020, 02:21 PM
Last Post: enigma619
  grep command based on lines in a pattern file Skaperen 1 2,125 Jan-07-2019, 10:23 AM
Last Post: Gribouillis
  Python with email forms, and frontend code in general MattH 4 3,289 Feb-18-2018, 03:29 AM
Last Post: MattH
  how to create python modal forms shaun 3 3,959 Jan-17-2018, 02:08 PM
Last Post: hshivaraj
  windows grep messed up Larz60+ 4 4,378 Mar-27-2017, 01:58 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020