> On 7/29/19 6:01 PM, Martijn Dekker wrote:
> > Because that command is empty in this instance, bash does not bother to
> > substitute a file name, and the <() is substituted by nothing.

I didn't know this behavior. I tried several commands and found that
if there is a space between ( and ), it is expanded to the pipe name.

  bash-5.0.7$ echo <()

  bash-5.0.7$ echo <( )
  /dev/fd/63

Is there a reason for this behavior? I expected that it is substituted
to a pipe name even if the command is empty. For example, if we
consider a command something like ``eval "func1 <($command)"'', it
reads from stdin instead of empty stream when the variable `command'
is empty. I also tried the same command `echo <()' in Zsh, but Zsh
substitutes <() into a pipe name. If there is a readon for Bash's
behavior, is this documented? At least in the section of the process
substitution in the manual, I could not find the description.

--
Koichi

Reply via email to