Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 3
    after a quick search, I realized that I can just make alias egrep="grep -E" in .bashrc since alias is prioritized over $PATH from unix.stackexchange.com/a/132628/477417
    – Kristian
    Commented Dec 8, 2022 at 3:54
  • 1
    or, better yet, you could modify your scripts that use the obsolete egrep so that they use grep -E instead. egrep has been deprecated for decades now, that's more than enough time to stop using it.
    – cas
    Commented Dec 8, 2022 at 4:58
  • 3
    Use echo 'grep -E "$@"' > /usr/bin/egrep, ie double quote the $@ Commented Dec 8, 2022 at 6:49
  • What will you do when egrep is completely removed? Commented Dec 8, 2022 at 15:30