Re:Perl first commit: a “replacement” for Awk and sed
by kdmccormick on Sunday July 09, 2023 @09:50AM
(#36654433)
Well, I look at the POSIX standards whenever I want to write shell scripts and Makefiles that work on both Linux and macOS. Which, in my current role, is often enough that I am driven crazy by how far POSIX is behind GNU tooling...
[ Parent
| on HN ]
Re:Perl first commit: a “replacement” for Awk and sed
by kristopolous on Sunday July 09, 2023 @03:27PM
(#36657981)
Yep. Funny enough, Linux is actually not POSIX certified
POSIX was initially a bunch of the Unix vendors getting together in the 80s saying "this shit is crazy let's find something we can agree on" and then the conflicts of trying to still have a differentiating But Also compatible product.
As a result, POSIX was intentionally kneecapped by all the players but not enough to make it completely worthless.
By the 2010s I decided to simply ignore it and if something breaks on FreeBSD or whatever, make the decision then whether to support it or not.
Re:Perl first commit: a “replacement” for Awk and sed
by kdmccormick on Monday July 10, 2023 @01:00AM
(#36662304)
Got it. I'm the dev tools guy at my job right now, and we have a mix of Linux and Mac users, so I've gotta make sure that any shell I write works on both. For me, POSIX seems to be a good indicator of the intersection between the two OSs, even though the true intersection is neither a superset nor subset of POSIX (eg, Mac has bash, which isn't POSIX shell). Oh well. It's close enough to be useful, and I test it all manually anyway.
Re:Perl first commit: a “replacement” for Awk and sed
by tannhaeuser on Tuesday July 11, 2023 @05:41AM
(#36678514)
Mac OS ships zsh since 10.15 as default shell as I'm sure you know, with the (restricted ksh subset called) POSIX shell pretty much the intersection of what works on both Linux and Mac OS. There you have the usefulness of POSIX/SUS.