A peek at POSIX sh's future goodies

BoingBoomTschak1 pts0 comments

A peek at POSIX sh's future goodies<br>A peek at POSIX sh's future goodies<br>Published on 2026-06-04<br>Tags: programming, sh

While it feels like POSIX.1-2024 got released just yesterday and a lot of shells/coreutils<br>still aren't fully conformant (e.g. test -nt/-ot in bash/zsh, read -d or OpenBSD/NetBSD/MacOS often lagging behind), I've been perusing the Austin<br>Group bug tracker to get an<br>idea of what's (almost certainly?) slated for the coming Issue 9.<br>mktemp -d §<br>Link<br>That's the big one, alright. Especially with -d mind you, as POSIX already had echo 'mkstemp(/tmp/tmp.XXXXXX)' | m4 for the file variant (as used in my current shim).<br>Some of you may underestimate how often you want temporary directories in scripts.<br>xargs -P §<br>Link<br>Together with the previously standardized -0 option and NPROCESSOR_ONLN, finally an ergonomic way to get parallel command execution! A bit of duck taping later and we<br>got tr '\n' '\000' | xargs -n1 -r -0 -P$(getconf NPROCESSOR_ONLN) $cmd. Even more<br>fiddling and the use of sh -c '...' argv0 as command can get you almost everything you<br>could want from GNU parallel modulo the distributed features (cf pararun).<br>The rest §<br>Some comparatively less important stuff in no specific order:<br>\A and \z in (extended) regular expressions, link.<br>vi/ex -u RCFILE to specify a different configuration, link.<br>find -perm /OCTAL to match files with any of their mode's bits set in OCTAL, link.<br>xargs -o to reopen stdin as /dev/tty in order to use with<br>interactive commands, link.<br>And finally, two interesting requests currently in the "Under Review" state: standardize more grep and diff options.

Made with , and spinneret, served by Generated by make-website Thu, 04 Jun 2026 20:27:57 +0000

link posix peek future goodies xargs

Related Articles