2018-04-26 00:56:51 +0200, Martijn Dekker: [...] > #! /usr/bin/env bash > > I don't know a system that has 'env' at any other location, so I think > /usr/bin/env should join /dev/tty and a few others as a standard path.
But then again, POSIX doesn't specify the shebang mechanism. > A4. Option flag 'i' in $- to see if shell is interactive. That was discussed here earlier, I don't remember if a ticket was created for it. [...] > A5. The -nt, -ot, -ef operators in test/[ > > All current shells support these. This is the only built-in way shells have > to determine if a file is newer, older or the same file as another file. As > far as I know, other POSIX utilities do not provide for this possibility. So > I think these should be standardised. There's already a ticket for that, but that ticket also asks for [[...]] which IMO should be separated out. Note that you can also use find -newer (with or without -L). > B. Standardised features that (almost) nobody ever implements > > B1. EBCDIC. POSIX doesn't mandate support for EBCDIC but acknowledges that some systems may use other charsets than ASCII for their base charset. But I agree it's a lot of wasted effort to accomodate those in today's inter-connected world. > B2. Standard utilities defined as shell functions. Note that ksh implements some utilties as aliases which actually breaks compliance. $ ksh -c 'type () { command -V "$@"; }; type ls' ksh: syntax error at line 1: `(' unexpected The thing is, unless a ticket is created, it's unlikely anything will be done about it. I have my own list of "issues" I would like to raise (around 40 at this time). But as it's a lot of effort to create and properly research those, it probably won't happen until I quit my day job. Here are a few to complete your list: POSIX should at least allow .* expansion not to include "." and "..". unset should be guaranteed to clear the export attribute printf %20s "$text" should be allowed to count those 20 in terms of characters instead of bytes. If printf is meant to be a printf(3) wrapper (which was the justification for that misbehaviour last time I asked), then that means the format can only have characters of the portable character set. Specify env -u */? vs invalid byte sequences. ?* should be guaranteed to match on non-empty byte sequences. specify awk length(array) specify gawk -E to have a reliable way to write awk scripts Specify xargs -r and allow it to be the default echo unspecified if argv[1] =~ ^-[eEn]* -- Stephane