3 ms·
You’re right that defaulting to the GNU coreutils is probably more convenient. However, NOT doing this is a good way to ensure that any scripts you write remain
by gpanders 6y ago
You’re right that defaulting to the GNU coreutils is probably more convenient. However, NOT doing this is a good way to ensure that any scripts you write remain portable and don’t use GNU extensions. That’s the reason I stick with the default BSD coreutils on macOS.
- fooblat 6y ago> You’re right that defaulting to the GNU coreutils is probably more convenient. It's not about convenience. It is about having a development environment that matches the target runtime environment. You can run into nasty surprises when the default behavior of a tool in your dev environment is different than in your production environment. I've been writing shell scripts professionally for over 20 years and I have always taken this approach and it has served me well.
- saagarjha 6y agoYou could also try restricting yourself to POSIX shell.