Hello,

On Fri 18 Apr 2025 at 08:18am -04, Michael Stone wrote:

> On Fri, Apr 18, 2025 at 02:52:17PM +0800, Sean Whitton wrote:
>>On Thu 17 Apr 2025 at 08:02pm -05, Richard Laager wrote:
>>> So, personally, I think getting mktemp(1) added to POSIX would be
>>> better for portability in the long run anyway.
>>
>>Eventually.  POSIX.1-2017 is going to be the thing to target for a long
>>time, I think.
>
> I think POSIX is mostly a relic, and not worth worrying about except as one of
> many inputs. Too many mistakes were made too early on, and it's just too late
> to get everyone to agree on a common standard because real world
> implementations diverged in too many ways. If someone wants to make a program
> that works reliably across platforms sh isn't the right tool in 2025. (And I
> say that as someone who quotes POSIX regularly: it has value for things like
> choosing amongst a set of possible implementations, but not for making
> assumptions about what will work in the real world.)

I have interpreted scripts that I want to run on any FreeBSD and Debian
machine, because they are part of my OS bootstrapping.  What else is
there than POSIX sh for this?  Therefore, it's still relevant.

> I'm curious what modern platform doesn't have mktemp; is this more than an
> academic question?

I don't know.  There are other things that you want awk for if you are
doing pure POSIX sh scripting; mkstemp is just an example.

-- 
Sean Whitton

Reply via email to