News for hackers. Stuff that matters.
Re:Use long flags when scripting (2013) by samtheprogram on Friday September 18, 2020 @02:06PM (#24519970)
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.

Re:Use long flags when scripting (2013) by saagarjha on Friday September 18, 2020 @10:59PM (#24524551)
I 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.
Re:Use long flags when scripting (2013) by samtheprogram on Saturday September 19, 2020 @02:58AM (#24525714)
Same 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.
Re:Use long flags when scripting (2013) by dathinab on Sunday September 20, 2020 @10:05AM (#24534110)
If 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.