Ugrep – a more powerful, ultra fast, user-friendly, compatible grep

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  • Another issue with Hyperscan is that if you enable HS_FLAG_UTF8[1], which hypergrep does[2,3], and then search invalid UTF-8, then the result is UB.

    > This flag instructs Hyperscan to treat the pattern as a sequence of UTF-8 characters. The results of scanning invalid UTF-8 sequences with a Hyperscan library that has been compiled with one or more patterns using this flag are undefined.

    That's another issue you'll need to grapple with if you use Hyperscan. PCRE2 used to have this issue[4], but they've since defined the semantics of searching invalid UTF-8 with Unicode mode enabled. ripgrep 14 uses that new mode, but I haven't updated that FAQ answer yet.

    [1]: https://intel.github.io/hyperscan/dev-reference/api_files.ht...

    [2]: https://github.com/p-ranav/hypergrep/blob/ee85b713aa84e0050a...

    [3]: https://github.com/p-ranav/hypergrep/blob/ee85b713aa84e0050a...

    [4]: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#why...

  • hypergrep

    Recursively search directories for a regex pattern

  • Another issue with Hyperscan is that if you enable HS_FLAG_UTF8[1], which hypergrep does[2,3], and then search invalid UTF-8, then the result is UB.

    > This flag instructs Hyperscan to treat the pattern as a sequence of UTF-8 characters. The results of scanning invalid UTF-8 sequences with a Hyperscan library that has been compiled with one or more patterns using this flag are undefined.

    That's another issue you'll need to grapple with if you use Hyperscan. PCRE2 used to have this issue[4], but they've since defined the semantics of searching invalid UTF-8 with Unicode mode enabled. ripgrep 14 uses that new mode, but I haven't updated that FAQ answer yet.

    [1]: https://intel.github.io/hyperscan/dev-reference/api_files.ht...

    [2]: https://github.com/p-ranav/hypergrep/blob/ee85b713aa84e0050a...

    [3]: https://github.com/p-ranav/hypergrep/blob/ee85b713aa84e0050a...

    [4]: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#why...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rebar

    A biased barometer for gauging the relative speed of some regex engines on a curated set of tasks.

  • I'm the author of ripgrep and its regex engine.

    Your claim is true to a first approximation. But greps are line oriented, and that means there are optimizations that can be done that are hard to do in a general regex library.

    If you read my commentary in the ripgrep discussion above, you'll note that it isn't just about the benchmarks themselves being accurate, but the model they represent. Nevertheless, I linked the hypergrep benchmarks not because of Hyperscan, but because they were done by someone who isn't the author of either ripgrep or ugrep.

    As for regex benchmarks, you'll want to check out rebar: https://github.com/BurntSushi/rebar

    You can see my full thoughts around benchmark design and philosophy if you read the rebar documentation. Be warned though, you'll need some time.

    There is a fork of ripgrep with Hyperscan support: https://sr.ht/~pierrenn/ripgrep/

  • ugrep-benchmarks

    ugrep benchmarks

  • I think you should try it before you read these benchmarks from the authors: https://github.com/Genivia/ugrep-benchmarks

  • bat

    A cat(1) clone with wings.

  • Good find, thanks! I'll check if I prefer it to moar.

    As for bat, according to https://github.com/sharkdp/bat#using-bat-on-windows, the Chocolatey package simply installs `less` alongside `bat`. Seems like a good idea, but I haven't tried it.

  • ired

    minimalistic commandline hexadecimal editor similar to radare

  • So ired is a toy. One wonders how many search results you've missed over the years because of ired's feature "it's so minimal that it's wrong!" I mean sometimes tools have bugs. ripgrep has had bugs too. But this one has been in ired since 2009.

    What is it that you said? YIKES. Yeah. Seems appropriate.

    [1]: https://github.com/BurntSushi/dotfiles/blob/eace294fd80bfde1...

    [2]: https://github.com/radare/ired/blob/a1fa7904e6ad239dde950de5...

  • ugrep

    NEW ugrep 6.0: a more powerful, ultra fast, user-friendly, compatible grep. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • grab

    experimental and very fast implementation of a grep (by stealth)

  • Also look at https://github.com/stealth/grab from Sebastian Krahmer.

  • repgrep

    An interactive replacer for ripgrep that makes it easy to find and replace across files on the command line.

  • igrep

    Interactive Grep

  • grep_tui

    Basic grep command with a terminal-based interface

  • grepedit

  • fzf

    :cherry_blossom: A command-line fuzzy finder

  • You can also use fzf with ripgrep to great effect:

    [1]: https://github.com/junegunn/fzf/blob/master/ADVANCED.md#usin...

  • moar

    Moar is a pager. It's designed to just do the right thing without any configuration.

  • I don't believe bat is a paper; it's more of a pretty-printer that tends to call less.

    Two pallets that should work on Windows are https://github.com/walles/moar (golang) and https://github.com/markbt/streampager (Rust). There might also be a newer one that uses rust, I'm unsure.

  • streampager

    A pager for command output or large files

  • I don't believe bat is a paper; it's more of a pretty-printer that tends to call less.

    Two pallets that should work on Windows are https://github.com/walles/moar (golang) and https://github.com/markbt/streampager (Rust). There might also be a newer one that uses rust, I'm unsure.

  • ov

    🎑Feature-rich terminal-based text viewer. It is a so-called terminal pager.

  • dotfiles

    My configuration files and personal collection of scripts. (by BurntSushi)

  • So ired is a toy. One wonders how many search results you've missed over the years because of ired's feature "it's so minimal that it's wrong!" I mean sometimes tools have bugs. ripgrep has had bugs too. But this one has been in ired since 2009.

    What is it that you said? YIKES. Yeah. Seems appropriate.

    [1]: https://github.com/BurntSushi/dotfiles/blob/eace294fd80bfde1...

    [2]: https://github.com/radare/ired/blob/a1fa7904e6ad239dde950de5...

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • ugrep vs. grep – What are the differences?

    3 projects | /r/commandline | 8 Mar 2023
  • Grep Flags – The Good Stuff

    2 projects | news.ycombinator.com | 2 Feb 2022
  • Will musl eventually replace glibc

    2 projects | /r/C_Programming | 6 Jun 2021
  • Ripgrep is faster than {grep, ag, Git grep, ucg, pt, sift} (2016)

    2 projects | news.ycombinator.com | 15 Mar 2021
  • Potencializando Sua Experiência no Linux: Conheça as Ferramentas em Rust para um Desenvolvimento Eficiente

    5 projects | dev.to | 12 Dec 2023