On Sat, 2021-09-11 at 21:55 +0200, Guilhem Moulin wrote: > The use of `printf %b` to decode escape sequences is an internal > implementation detail; documenting it would tie our hands for > implementation changes… > > Also there is no guaranty that /bin/sh is dash; don't forget that we > also run at initramfs stage where /bin/sh is typically `busybox ash` > (but again no guaranty, it can be dash, bash, klibc's sh, or anything > else) for which `printf %b` *does* decode \xHH.
True. Well then best is probably to e.g. document the \0xxx and mention that any other use of \ needs to have that quoted or it may have a special meaning? That should neither over- nor under-specify it. Cheers, Chris. > >