Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: substituted command won't inherit stdin in pipeline
- X-seq: zsh-users 24425
- From: Oğuz <oguzismailuysal@xxxxxxxxx>
- To: Oğuz <oguzismailuysal@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: substituted command won't inherit stdin in pipeline
- Date: Wed, 13 Nov 2019 16:30:06 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Gk8EK5x7f3awz6xtnRddoVths/VtcadzRKWgtAgNxSA=; b=BfEru/3mA6+swmAStfuzzMC6KaKuBOtMp1n1LAiCWLfp5gmkHpoM2Icy8oNfzF7T8b QOa3sQ77EbGxu8xJw8+Yo9gMwHY3uRATVz8KDRLWR7rcDArUBauicuKo4T49z41QZ+Zk UUaEGyps0H4hvTGSh49Xcbi5kSqQSNGuxmXCqH99QZg9ehIG6TsNThLl0AAQQFX8RBx2 RPkM7OoUYVTcRSnhI4s/E34v3Cf9EvM4DF3dLsavAsa6vLhwtFHGTGH3EIxhIB26yg42 3+jPFTsh+nrUOLV7SLeVBqy5IodwD5DmWcNEzYlWrcNMm7l7JEqFBK3TvwoOUw/B/v2B VlTA==
- In-reply-to: <20191113130023.n7lgi2vov44kkjfl@chaz.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAH7i3Lo57yAd==m7zF+8mtETqYDDSptmdzxF-2t_pu42fe9ztQ__41421.1000244663$1573638841$gmane$org@mail.gmail.com> <20191113130023.n7lgi2vov44kkjfl@chaz.gmail.com>
On Wed, Nov 13, 2019 at 4:00 PM Stephane Chazelas <
stephane.chazelas@xxxxxxxxx> wrote:
> 2019-11-13 12:52:20 +0300, Oğuz:
> > On all sh implementations I have, this command
> >
> > echo foo | echo "$(cat)"
> >
> > prints 'foo', except for zsh, it hangs instead. From that I gather cat
> > doesn't inherit echo's stdin, and it waits for input.
> [...]
>
> Not exactly what happens in that the expansions in the arguments
> of the commands in the pipeline are performed in the parent,
> from left to right, not in the processes that run the
> individualy pipe components (also note that the right-most pipe
> component is run in the current shell anyway, like in ksh93,
> unlike in bash).
>
[...]
Now I'm confused. Is this what standard says, or what zsh does?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author