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


Groups > gnu.bash.bug > #15272

Re: x[

From Koichi Murase <myoga.murase@gmail.com>
Newsgroups gnu.bash.bug
Subject Re: x[
Date 2019-07-30 09:30 +0900
Message-ID <mailman.212.1564446675.1985.bug-bash@gnu.org> (permalink)
References (1 earlier) <9EA25AF1-6D80-456A-81FA-6D908072E624@gmail.com> <a6a2b6a8-6151-78dc-41be-fc81250a40e5@archlinux.org> <db16f8b8-2a6d-a894-799d-f31827e72d92@inlv.org> <0aceaf50-5729-4ae2-c5be-a66a2ac6e6b8@archlinux.org> <CAFLRLk_S1EENFJvn6Ec73M3Y7dRm=V0QgkigEhpheaqraj4HEg@mail.gmail.com>

Show all headers | View raw


> 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

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web