Hi,
POSIX 2024 added a useful syntax to sh to pass escape characters [1]. We
can see the behavior in bash, for example:
$ test $'\r' = `printf '\r'` && echo okay
okay
OpenBSD's ksh does not support this:
$ test $'\r' = `printf '\r'` && echo okay
This feature seems useful, and would be nice to have in ksh. I'll look
into implementing it myself, but would not complain if someone got
around to it first.
I see a patch was posted for this previously, but it does not work [1].
My typo even caused a segfault:
$ test $'\r' = `printf '\r'` && echo okay
$ if test $'\r' = `printf '\r'
Segmentation fault (core dumped)
Collin
[1] https://marc.info/?l=openbsd-tech&m=174326721429636