>(Process substitution) utterly b0rken

16 views
Skip to first unread message

Martijn Dekker

unread,
Jun 10, 2020, 8:03:16 AM6/10/20
to korn-...@googlegroups.com
Yikes. Here's one whopper of a ksh93 bug that I just found, in 2011 and
2012 release versions:

Process substitution of the form >(list) is utterly broken:

$ echo ok > >(sed s/ok/good/)

Expected output: "good" (as on bash and zsh)

Actual output:
* either none, with a file with a bizarre binary file name created
in the current working directory that contains $'ok\n'
(which is what happens on Linux and Solaris);
* or (depending on the file system and/or OS and/or locale) an
error message indicating the refusal to create that file:
ksh: ?: cannot create [Illegal byte sequence]
(which is what happens on my Mac).

Before I spend hours searching for the cause, does anyone have any idea
where to begin debugging this?

- Martijn

--
|| modernish -- harness the shell
|| https://github.com/modernish/modernish
||
|| KornShell lives!
|| https://github.com/modernish/ksh
Reply all
Reply to author
Forward
0 new messages