ugrep - even more extended grep

Submit command line tools that you find here.
Post Reply
Message
Author
User avatar
webfork
Posts: 10821
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

ugrep - even more extended grep

#1 Post by webfork »

Background

One of the more frustrating things I've run into when someone hands me a regex code of one kind or another is that I may or may not be able to use it immediately. I've been annoyed to find some similarity with Word macros, where it depends on what flavor of Office you're using. You can see some breakdown on common issues around this with the Confusing Grep Mistakes I've Made post (via ycombinator).

Fortunately there's a program like ugrep that allows a number of different regex functions along with a load of other features.

Before you begin

A lot of the usage of this program is dependent upon understanding of grep. Much of the program and documentation is written as an extension, so I'm almost tempted to post this under the current grep topic. However, it's more than a question of some additional speed or features, there's a lot of improvement here.

Features

- Office files - Included filters to search inside office files like PDF, DOCX, and more using pdftotext and libreoffice. Expect there's a way to work with portable versions of those programs, but hopefully will sort that out in the near future.
- Regular Expressions - As noted above, supports a variety of different regex tools so you can use one or more of your already established and de-bugged codes.
- ZIP, GZ, etc. - Ability to search inside archives (not sure if it supports 7zip).

Home: https://www.genivia.com/get-ugrep.html
Github: https://github.com/Genivia/ugrep/
Download: https://github.com/Genivia/ugrep/releases
Softpedia: https://www.softpedia.com/get/System/Fi ... grep.shtml
Last edited by webfork on Sun Nov 08, 2020 9:36 am, edited 2 times in total.
Reason: (fixed some wording)

User avatar
SYSTEM
Posts: 2043
Joined: Sat Jul 31, 2010 1:19 am
Location: Helsinki, Finland

Re: ugrep - even more extended grep

#2 Post by SYSTEM »

More powerful grep. Very nice. :)
My YouTube channel | Release date of my 13th playlist: August 24, 2020

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: ugrep - even more extended grep

#3 Post by __philippe »

Very nice find indeed, Thanks @webfork ! 8)

Caveats:
ugrep requires an X64 machine

• Under Win7 X64
    ugrep v304 current version throws an error message :?

Code: Select all

The procedure entry point CreateFile2 could not be located in the dynamic link library KERNEL32.dll
• Under Win7 X64
    ugrep v256 older version works fine :)

User avatar
rbon
Posts: 363
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: ugrep - even more extended grep

#4 Post by rbon »

__philippe wrote: Sun Nov 08, 2020 3:23 am Very nice find indeed, Thanks @webfork ! 8)

• Under Win7 X64
    ugrep v304 current version throws an error message :?

Code: Select all

The procedure entry point CreateFile2 could not be located in the dynamic link library KERNEL32.dll
GitHub -> Genivia/ugrep -> Issue: ugrep rel 3.0.4 do not run on Windows 7 - 64 bit #78
Author write:
I made this small change to produce a v3.0.4 ugrep.exe update and replaced the release artifact. It is the same version, just changed CreateFile2 to CreateFileW. Tested this with Unicode file names on Windows 10 and it looks OK.
So You must re-download the file 'ugrep.exe' and it's works. New file has the same name and size, but it has been changed.
Caveats:
ugrep requires an X64 machine
For some raisons on download page All files are for 64 bit systems.
If You will a 32 bit version You must:
1. Genivia/ugrep https://github.com/Genivia/ugrep/blob/m ... /ugrep.exe
2. press download https://github.com/Genivia/ugrep/raw/ma ... /ugrep.exe
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook.

User avatar
rbon
Posts: 363
Joined: Wed Mar 28, 2007 2:16 am
Location: Italy

Re: ugrep - even more extended grep

#5 Post by rbon »

Ugrep Help:
If You launch ugrep.exe rel. 3.0.4 (64 bit) with parameter --help, You obtain a list of all comands and options.

Code: Select all

C:\downloads>ugrep --help
Usage: ugrep [OPTIONS] [PATTERN] [-f FILE] [-e PATTERN] [FILE ...]
.. very long list of All commands 
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook.

User avatar
Midas
Posts: 6726
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: ugrep - even more extended grep

#6 Post by Midas »

And if you want, you can easily capture that list into a plain text file for easier reading/annotating...

Code: Select all

C:\downloads>ugrep --help > ugrep.txt

User avatar
__philippe
Posts: 687
Joined: Wed Jun 26, 2013 2:09 am

Re: ugrep - even more extended grep

#7 Post by __philippe »

@rbon
Thanks for the tips about ugrep v304 freshly corrected version and for Github x32 folder location.

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: ugrep - even more extended grep

#8 Post by TP109 »

__philippe wrote: Mon Nov 09, 2020 7:07 am @rbon
Thanks for the tips about ugrep v304 freshly corrected version and for Github x32 folder location.
ditto

User avatar
Midas
Posts: 6726
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: ugrep - even more extended grep

#9 Post by Midas »

ugrep v4.4.1 released 2023-12-19 (changes and downloads at https://github.com/Genivia/ugrep/releases).
The ugrep file pattern searcher [is] a more powerful, ultra fast, user-friendly, compatible grep.

Search with a TUI (shown [below...]) or from the command line with grep-compatible options. You can also Google search (shown) and fuzzy search your files. Search (nested) zip/tar/pax/cpio archives, tarballs and compressed files, search and hexdump binary, search PDF, doc, docx, and much more.

ugrep search benchmarks at https://github.com/Genivia/ugrep-benchmarks.


Image

Post Reply