[GTALUG] Fedora 38 is out

BCLUG admin at bclug.ca
Fri Apr 21 14:13:19 EDT 2023


Stewart C. Russell via talk wrote on 2023-04-21 10:45:

> I hear that it ships with the latest GNU grep, which removes fgrep
> and egrep. This could be considered a bad idea: 
> https://mastodon.social/@cks/110232377928840323

I never, ever use fgrep or egrep and I think it's a bad idea.


However, the reason being it breaks a lot of scripts, while valid, also
raises the issue that scripts ought to use the long form of all options
for future readability and maintenance.


I've fielded questions on why, i.e., an `rsync` script wasn't performing
well.

Translating the `rsync -a -b -c -d 1 -e -f -g ...` to long-form options
indicated a couple issues with somewhat contradictory options (likely a
copy/paste from Stack Overflow) that became immediately apparent.


So, `egrep` would be `grep --extended-regexp`, `fgrep` should be `grep
--fixed-strings` and `rgrep` should be `grep --recursive` in scripts.



`man grep`:

> In addition, the variant programs egrep, fgrep and rgrep are  the 
> same as  grep -E,  grep -F,  and  grep -r, respectively.  These 
> variants are deprecated, but are provided for backward
> compatibility.


My 2ยข


rb



More information about the talk mailing list