Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15272 > unrolled thread

Re: x[

Started byKoichi Murase <myoga.murase@gmail.com>
First post2019-07-30 09:30 +0900
Last post2019-07-30 09:30 +0900
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: x[ Koichi Murase <myoga.murase@gmail.com> - 2019-07-30 09:30 +0900

#15272 — Re: x[

FromKoichi Murase <myoga.murase@gmail.com>
Date2019-07-30 09:30 +0900
SubjectRe: x[
Message-ID<mailman.212.1564446675.1985.bug-bash@gnu.org>
> 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

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web