ZOSOpenTools / bashport

z/OS Port of bash: the GNU Project's shell - the Bourne Again SHell
Apache License 2.0
8 stars 3 forks source link

Process substitution issues when using /dev/fd #59

Closed IgorTodorovskiIBM closed 1 year ago

IgorTodorovskiIBM commented 1 year ago

z/OS offers both /dev/fdN and /dev/fd/N. It seems that on some systems, /dev/fd is a character device and in others it's a directory. Bash assumes it is always a directory, so this can introduce problems on systems where it's a character device.

Another issue is that the character devices are untagged and as such there is no autoconversion.

gngrossi commented 1 year ago

Looks good...thanks

RC=(0) [SYSA] bash-5.2$ echo <(date) /dev/fd63

RC=(0) [SYSA] bash-5.2$ cat <(date) Wed Mar 29 14:54:50 CDT 2023

RC=(0) [SYSA] bash-5.2$ cat <(ssh l98misdb491 "wc -l *Yum") 4 servers_IUCV_Yum

gngrossi commented 1 year ago

forgot this test...good

RC=(0) [SYSA] bash-5.2$ wc -l <(ssh l98misdb491 "cat *Yum") 4 /dev/fd63

IgorTodorovskiIBM commented 1 year ago

Thanks for validating! I will close it off