Am 24.09.21 um 17:51 schrieb Junio C Hamano: > Phillip Wood <phillip.wood123@xxxxxxxxx> writes: > >>> +sed -n -e '/^~~~~*$/ {x; s/^.*$/ "&",/; p;}; x' \ >> >> POSIX does not support using a semicolon after a closing brace [1], >> ... >> [1] "Editing commands other that {...}, a, b, c, i, r, t, w, : and # >> can be followed by a <semicolon>" from >> https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html > > Would sed implementation of BSD ancestry fail reliably to be a good > coalmine canary? I doubt it. https://man.openbsd.org/sed says: "Multiple commands may be specified separated by newlines or semicolons" "The a, c, i, r, and w functions cannot be followed by another command separated with a semicolon." "Following the b, t, or : commands with a semicolon and another command is an extension to the specification." "The use of newlines to separate multiple commands on the command line is non-portable" https://www.freebsd.org/cgi/man.cgi?query=sed doesn't mention semicolons at all. On macOS 11.6 (FreeBSD-based userland) the semicolon is accepted: $ echo a | sed -n -e '{p;}; p' a a René