-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
rhel-9.5
-
None
-
No
-
Low
-
Customer Reported
-
rhel-plumbers
-
1
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
What were you trying to do that didn't work?
If "filename" is generated by process substitution, the Korn shell introduces a space before the generated pathname which breaks the command syntax.
====
$ bash -cx 'echo @<(date)'
+ echo @/dev/fd/63
@/dev/fd/63
$ ksh -cx 'echo @<(date)'
+ echo @ /dev/fd/3
@ /dev/fd/3 .>>
====
The Korn shell has split the "@filename" into two arguments which means a real command (other than the demonstration "echo" command) fails as the arguments are now invalid.
Facing this while attempting to use process substitution with a leading @ character (e.g., @<(date). According to the ksh man page observed that , process substitution <(list) or >(list) should expand into a single filename argument. Instead, seems ksh splits this into two arguments (@ and /dev/fd/...).
What is the impact of this issue to you?
Customer reported that Re-coding required to avoid Korn shell in this scenario.
Please provide the package NVR for which the bug is seen:
In customer's environment:
$ rpm -qf /bin/ksh
ksh-1.0.6-4.el9_5.x86_64
In my test system where issue is reproducible as well:
Always
Steps to reproduce:
- Install ksh on a RHEL system.
- Run a simple process substitution in ksh with a leading `@`.
$ ksh -cx 'echo @<(date)'
+ date
+ echo @ /dev/fd/3
@ /dev/fd/3
Expected results:
The substitution should remain a single token:
# ksh -cx 'echo @<(date)'
+ echo @/dev/fd/3
@/dev/fd/3
Actual results:
ksh splits the expansion into two tokens:
+ echo @ /dev/fd/3 @ /dev/fd/3