On Thu, Jul 18, 2024, at 2:21 PM, Zack Weinberg wrote: > On Thu, Jul 18, 2024, at 1:50 PM, Jan Engelhardt wrote: >> On Thursday 2024-07-18 15:40, Zack Weinberg wrote: >>>On Thu, Jul 18, 2024, at 5:09 AM, Tijl Coosemans wrote: >>>> Automake 1.17 produces a warning for the use of \# here: >>>> >>>> https://github.com/ddclient/ddclient/blob/d88e6438efbc53e977546693f6835f7517072a06/Makefile.am#L22 >>> >>>subst = sed \ >>> -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \ >>> -e '1 s|^\#\!.*perl$$|\#\!$(PERL)|g' \ >>> -e 's|@localstatedir[@]|$(localstatedir)|g' \ >>> [etc] >> >> How much if EBCDIC a thing still, or can we assume ASCII and use \x23? > > Many, possibly all, non-GNU implementations of sed do not support \x escapes > (nor any other C-style character escape sequences).
Slight correction: POSIX requires sed to support \n in regular expressions (meaning to match a newline) but does not require support for any other escape sequence that works in C strings. I would not be in the least bit surprised to learn that there were sed implementations in the 1990s that didn't support \n, and I would also not be surprised to learn that Solaris or AIX or even MacOS still ships a sed like that in its default $PATH, but you probably don't have to worry about such implementations until you trip over one. zw