4 ms·
Yes, if you care about portability. Anything that's not Linux likely won't have GNU grep installed by default. This includes macOS and the BSDs. If this is you
by samtheprogram 6y ago
Yes, if you care about portability. Anything that's not Linux likely won't have GNU grep installed by default. This includes macOS and the BSDs.
If this is your own dotfiles or utilities, sure, but if I'm working on something collaborative, yes, I care about the standard.
- saagarjha 6y agoI stick to POSIX in my dotfiles precisely because I carry it around on many different systems and that’s the only thing that can keep it sane.
- samtheprogram 6y agoSame here — I felt it would detract from the point I was trying to make so I didn’t mention it, especially since I don’t think most people run multiple OS’s :) At the least though, I would assume people regularly have collaborators that run different OS’s.
- dathinab 6y agoIf I would create something which needs that degree of portability I would never use a shell script. It's just way too easy to run into a unexpected gotcha on some platform/configuration.