grep [regular expressions search in text]

Submit command line tools that you find here.
Post Reply
Message
Author
vevy
Posts: 681
Joined: Tue Sep 10, 2019 11:17 am

grep [regular expressions search in text]

#1 Post by vevy » Sun Oct 25, 2020 12:55 am

"Is there a Windows-included tool for this task?"
"I only want open-source tools"
"I want a tool that is still actively developed"
"So many to choose from!"
and many more!
Support easy-to-do filters and badges!

User avatar
webfork
Posts: 9532
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: grep [regular expressions search in text]

#2 Post by webfork » Sun Oct 25, 2020 8:44 am

When a program listed in the database is an acronym or abbreviation, we list out the root of a program's naming, but with grep there's actually a bit of a (~50 year old) story behind it:

Where grep came from
https://www.youtube.com/watch?v=NTfOnGZUZDk

In addition to discussing why regular expressions are so odd and the early giants of UNIX Ken Thomas and Dennis Richie, it also goes into how the initial goal was text analysis, the thing that brought me to grep.

vevy
Posts: 681
Joined: Tue Sep 10, 2019 11:17 am

Re: grep [regular expressions search in text]

#3 Post by vevy » Sun Oct 25, 2020 8:51 am

Yeah! Just a thread stub to be filled later. Sorry!

For the TL;DW (You should watch!):
g/re/p
g=global
re="regular expression" here
p=print matching lines
"Is there a Windows-included tool for this task?"
"I only want open-source tools"
"I want a tool that is still actively developed"
"So many to choose from!"
and many more!
Support easy-to-do filters and badges!

rbon
Posts: 211
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: grep [regular expressions search in text]

#4 Post by rbon » Sun Oct 25, 2020 3:32 pm

I have found on GitHub a CLI scanner and regex extractor.

• Program name: rare
• rel. 0.1.2.7
• released: October 21, 2020
• GitHub project page: https://github.com/zix99/rare
• archive name: rare_0.1.27_Windows_x86_64.zip
• see Output Formats and all parameters on GitHub page
• Softpedia: https://www.softpedia.com/get/Programmi ... rare.shtml

Not tested.

vevy
Posts: 681
Joined: Tue Sep 10, 2019 11:17 am

Re: grep [regular expressions search in text]

#5 Post by vevy » Mon Oct 26, 2020 11:06 am

rbon wrote:
Sun Oct 25, 2020 3:32 pm
I have found on GitHub a CLI scanner and regex extractor.

• Program name: rare
• rel. 0.1.2.7
• released: October 21, 2020
• GitHub project page: https://github.com/zix99/rare
• archive name: rare_0.1.27_Windows_x86_64.zip
• see Output Formats and all parameters on GitHub page
• Softpedia: https://www.softpedia.com/get/Programmi ... rare.shtml

Not tested.
Thanks! Good-looking tool.
"Is there a Windows-included tool for this task?"
"I only want open-source tools"
"I want a tool that is still actively developed"
"So many to choose from!"
and many more!
Support easy-to-do filters and badges!

User avatar
webfork
Posts: 9532
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: grep [regular expressions search in text]

#6 Post by webfork » Mon Oct 26, 2020 3:08 pm

rbon wrote:
Sun Oct 25, 2020 3:32 pm
I have found on GitHub a CLI scanner and regex extractor.
Excellent suggestion. I was trying to sort out a way to go beyond just counting instances of a given term or value. I'm not sure if this will do what I was thinking, but just more tools in the realm of text analysis reports is a great thing.

vevy
Posts: 681
Joined: Tue Sep 10, 2019 11:17 am

Re: grep [regular expressions search in text]

#7 Post by vevy » Thu Oct 29, 2020 2:13 pm

One of the cool uses of grep (and any CLI tool that accepts stdin really), is "nested searching"; meaning you can look for lines that contain multiple certain words but without having to search them in a particular order.

For example,
grep "word 1" file.txt | grep "word 3" | grep "word 2"
will give you only the lines that contain all of the three words in any order.

Add to that a superb tool like gron ("make[­s] JSON grepabble") and some tasks just got a lot easier for a bunch of people!
"Is there a Windows-included tool for this task?"
"I only want open-source tools"
"I want a tool that is still actively developed"
"So many to choose from!"
and many more!
Support easy-to-do filters and badges!

Post Reply