4 ms·
While I hated the decision of adding warnings without much notice (which, in the case of such widely used CLI tools, is the equivalent of a breaking change), I
by blacklight 4y ago
While I hated the decision of adding warnings without much notice (which, in the case of such widely used CLI tools, is the equivalent of a breaking change), I also found an easy solution that would prevent my scripts from spitting out lots of unneeded warnings.
alias egrep='grep -E'
alias fgrep='grep -F'
Now GNU developers can keep doing whatever they're doing, and I can keep doing whatever I used to do.
- misnome 4y agoYour scripts expand aliases?
- koprulusector 4y agoshopt -s expand_aliases
- nyuszika7h 4y agoYou still have to define the aliases or source your aliases file in every script though.
- acdha 4y ago> While I hated the decision of adding warnings without much notice (which, in the case of such widely used CLI tools, is the equivalent of a breaking change) 15 years isn't “much notice”? I had already stopped using those back then because, as noted in the article, they weren't standardized and so you had to work about portability across Unix installations. It's also worth noting that this is only a breaking change if you are using the non-standard names in a context where you are trapping output. For the vast majority of people using a shell script which doesn't use the common name, they will at some point upgrade, see the warning, spend 30 seconds making the change, and never think about it again. If you're that sensitive to the extra work, presumably you also do some testing before installing new upstream releases. EDIT: it was actually 17 years ago that the warning was added about egrep/fgrep: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=0b4859eebda2820bd469c1d2d424f1be3314050f https://git.savannah.gnu.org/cgit/grep.git/commit/?id=0b4859...