We are stuck with egrep and fgrep (unless you like beating people)

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

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • freebsd-src

    The FreeBSD src tree publish-only repository. Experimenting with 'simple' pull requests....

  • > When it comes to avoiding forks, the question is why do egrep, fgrep have to be shell scripts rather than interpret the invocation name (argv[0]) for switching behavior.

    I don't know. I'd have taken the argv[0] approach personally. And it's the approach some other grep implementations have taken too (eg https://github.com/freebsd/freebsd-src/blob/main/usr.bin/gre...)

  • ShellCheck

    ShellCheck, a static analysis tool for shell scripts

  • I learned about it from ShellCheck [1] that warns if using egrep instead of `grep -E`. That tool deprogrammed many of my bad habits.

    [1] - https://www.shellcheck.net/

  • 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
  • void-packages

    The Void source packages collection

  • MaraDNS

    MaraDNS: A small open-source DNS server

  • While you haven’t used egrep that much, I used it a whole lot, well over 20 times for the automated test setup I have for my open source project. I had to spend most of an hour this morning updating the code to no longer use egrep, and it was non-trivial to update. Here’s the amount of hassle breaking egrep has given me:

    https://github.com/samboy/MaraDNS/commit/afc9d1800f3a641bdf1...

    This is just one open source project. I’ve seen fgrep in use for well over 25 years and egrep apparently has been around for a very long time too. Just because it didn’t get enshrined in a Posix document—OK, according to Paul Eggert it was made obsolete by Posix in 1992, but apparently no one got the telegram and it’s been a part of Linux since the beginning and is also a part of busybox—doesn’t mean it’s something which should be removed.

    I’m just glad I caught this thread and was able to “update” my code.

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