News for hackers. Stuff that matters.
Re:Use long flags when scripting (2013) by kazinator on Friday September 18, 2020 @02:04PM (#24519941)
Last published in 2018 (and actively being worked on) is not outdated.

https://pubs.opengroup.org/onlinepubs/9699919799/

> Sure systems seen try to somewhat be POSIX compliance

The mainstream systems you know and use adhere very rigorously to POSIX. GNU Libc, Kernel, Coreutils, ... and their counterparts in BSD Unixes, proprietary Unixes, Cygwin and whatnot all take POSIX seriously.

POSIX is very helpful, and smart coders and sysadmins use it as one of their references for required behavior.

Re:Use long flags when scripting (2013) by chubot on Friday September 18, 2020 @08:08PM (#24523192)
Larry Wall said It's easier to port a shell than a shell script in 1998 ... 22 years later I still think that holds.

https://news.ycombinator.com/item?id=10104203

Although I would agree that there's a slight hole there: you still need to port stuff like coreutils and all the dependencies, which has been done of course. But I'd be happier if something like busybox was actually portable.

Re:Use long flags when scripting (2013) by kazinator on Saturday September 19, 2020 @04:19AM (#24526024)
I think it's easier to write a portable shell script today than 30 years ago.

The Autoconf system is predicated on the idea that writing a portable shells script is hard, and so we hide the shell programming behind a mountain of M4 macros.

It's not necessarily easier to port a shell script today than 22 years ago, which was not written with portability in mind. There are more shells with more extensions, and then beyond the language concerns, and the environments have exploded. A shell script can easily depend on all sorts of cruft you've never heard of. Oh, just install these five things from the following github repos ...