4 ms·
> The egrep and fgrep commands have been deprecated since 2007. Isn't 15 years more than enough time to handle the deprecation?
by xpressvideoz 4y ago
> The egrep and fgrep commands have been deprecated since 2007.
Isn't 15 years more than enough time to handle the deprecation?
- angry_octet 4y agoNo. Make install a grep compatibility library if necessary, but don't change output syntax.
- loloquwowndueo 4y agoSure now that I’ve finished rebuilding all my dependencies to use 64-but time_t and migrated all my services to IPv6 I can finally take some time to finish the great *grep deprecation :) I’m just joking :)
- ht85 4y agoTo be fair, the pain of migrating time_t is nothing next to what I will feel trying not to type `fgrep` every time.
- Beltalowda 4y agoI betcha most people didn't even know they were considered "deprecated".
- ozim 4y agoThere is so much outdated info on the internet in various forms that it is hard even to realize what is "proper modern way" of doing things unless you really are into Linux \ config stuff. I am casual user so I can get around system but modern ways always surprise me when I finally find out about it.
- Beltalowda 4y agoAnd for all you know "grep -E" isn't supported on some system people use. This is not really a concern if you're just writing script for yourself (which are really >90% of scripts; portability often isn't really a concern), but knowing it will work on all systems – new and old – is pretty hard, and sometimes it does matter. Does it work on NetBSD? HP-UX? Solaris? Last year autoconf changed the `..` command substitution syntax to the "new" $(..) syntax and someone complained it broke on their ancient Solaris system. So ... people will stick with what works, like "egrep".
- kibwen 4y agoAnd now they do, so perhaps it's working as intended. :P
- LinuxBender 4y agoI learned about the deprecation from ShellCheck [1] that warns if using egrep instead of `grep -E`. That tool deprogrammed many of my bad habits. I had never seen any discussions about it otherwise. [1] - https://www.shellcheck.net/ https://www.shellcheck.net/
- tmtvl 4y agoThat's a cool tool, it's neat seeing Haskell in the wild. Unfortunately (or not?) I tend to use actual programming languages to make my tools rather than doing shell scripting, so I don't have anything interesting to put in there, but I'll keep a bookmark of it around.
- gw99 4y agoYes. This is the first I've heard of it and I've got a ton of scripts that are probably going to break.
- dspillett 4y agoI for one didn't know they were properly deprecated. Though I've not used either since uni over two decades ago¹ on a somewhat off-standard Unix a few of the machines ran, so until this thread I can't say I was remembering that they existed at all. ---- [1] using grep -E when needed since² [2] and presumably grep -F too though I don't remember ever actually doing that
- vultour 4y agoMost people shouldn’t have been using this in the first place. If you’ve been taught to use these in the last ~10 years then someone, somewhere, has failed horribly.
- ajross 4y agoNot when the command in question has been a standard part of all Unix shell environments since 1977, no. Is that a serious question? https://medium.com/@rualthanzauva/grep-was-a-private-command-of-mine-for-quite-a-while-before-i-made-it-public-ken-thompson-a40e24a5ef48 https://medium.com/@rualthanzauva/grep-was-a-private-command... What actually happened here is that POSIX skipped it. It never entered a standard, even though it was (literally!) in every OS and available to everyone. But no one cared that it wasn't in some arbitrary standard, because it was always there. For half a century! I dare say that "fgrep" and "egrep" have more active users (both interactive and scripted) than "awk" or "ed" or "od" or "bc", all of which are still around.