Skip to content

Instantly share code, notes, and snippets.

@Earnestly
Last active October 30, 2024 12:40
Show Gist options
  • Save Earnestly/29deee4f18346da6630ed1df760f1590 to your computer and use it in GitHub Desktop.
Save Earnestly/29deee4f18346da6630ed1df760f1590 to your computer and use it in GitHub Desktop.
A Selected List of Additions and Changes Coming With POSIX Issue 8

A Selected List of Additions and Changes Coming With POSIX Issue 8

Last major change: 10th March 2023

See Also: http://mywiki.wooledge.org/POSIX#Utilities

New Commands

Additions

Utility Change Usage
sh Dollar Single Quotes $'\n'
Pipefail set -o pipefail
case Fallthrough case ... in ...) ... ;&
New test Expressions <, >, -nt, -ot and -ef
Support Delimited read read -d ''
Glob .* May Exclude dot and dot-dot [1] for dotfiles in .*
Dynamic fd Allocation exec {var} > file
Brace Expansion [1] {start..end}, {a,b,c}
trap Include the Default trap Conditions -p
stty Provide size, rows and cols stty size; stty cols 80
rm Verbose Flag -v
Explicit rmdir Functionality -d
cd Exit if Current Working Directory Cannot be Determined -e
Empty Argument is Now an Error cd ''
sed Support Extended Regular Expressions -E
Case Insensitive Substitution sed 's/CaSe/insensitive/i'
awk Return the Number of Array Elements with length() length(array)
Add fflush() Function fflush()
Add nextfile Statement nextfile
The delete Statement Now Deletes Entire Array delete array
Seed Value Unspecified if rand is Issued Before srand
date Seconds Since Epoch date +%s
tail Reverse Order -r
head Count in Bytes -c
printf Gettext C-Format for Re-ordering Format Specifiers printf '%1$s has some number %2$d\n'
find Null Terminated Output -print0
ps Wide Output -w
dd Read Until EOF or Block Size is Reached dd iflag=fullblock
xargs Null Terminated Input -0
No Execution With Empty Input -r
make Support Indirect Expansion of Macros $(indirect_$(expansion))
Add .PHONY Target .PHONY:
Support Multiple Files with include include foo.mk bar.mk baz.mk
Allow Include Failures -include might-not-exist.mk
Allow Hyphens in Macro Names hyphen-in-macro-name = allowed
Allow Slashes in Target Names foo/bar.o: foo/bar.c
Add Pattern Substitution $(foo:%.o=%.c)
Non-Recursive Macro Assignment (GNU Style) ::=
Non-Recursive Macro Assignment (BSD Style) :::=
Optional Macro Assignment ?=
Appending Macro Assignment +=
Shell Command Macro Assignment !=
Add CURDIR Macro CURDIR
Provide the $^ Internal Macro $^
Provide the $+ Internal Macro $+
Support Parallelism -j
Dynamic Rebuilding of Included Files [1]
Add .NOTPARALLEL and .WAIT Special Targets foo: one .WAIT two
tsort Allow Exit Status to Count Number of Cycles if Any Encountered -w
mailx Reject Sending Empty Messages -E
bc Allow Functions to Accept Arrays in Last Argument Position define w(l a[])
logger Add -f file, -i, -p priority, -t tag

Footnotes

Footnotes

  1. These features are at the implementation's discretion and not required by the standard.

@ormaaj
Copy link

ormaaj commented Jul 9, 2023

mktemp has only just been proposed. It hasn't been approved and there's no draft spec. There hasn't been any progress on it in a while.

@Earnestly
Copy link
Author

Yes, I must have mistook the "Desired Action" as the accepted text. Thanks, I'll remove it for now and hope it can be added back eventually.

@eli-schwartz
Copy link

Due to conflicting opinions on the ticket it appears that test did not gain a ==, as despite being part of the desired action, it's not in the final accepted text. More generally it was split out into its own proposal at https://austingroupbugs.net/view.php?id=762

@Earnestly
Copy link
Author

I see it now, will remove ==

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment