From: Kartik Agaram <akkartik@gmail.com>
To: zsh-workers@zsh.org
Subject: pipelines transmitting data even after redirecting stdout
Date: Thu, 30 May 2019 20:35:17 -0700 [thread overview]
Message-ID: <CANOtCLXNrgX+-wds6gAdm0LRJxZGUKJc3ZVOeVJhCGBGAaxdTw@mail.gmail.com> (raw)
In the rest of this message I'm running within a zsh sub-process
without any dotfiles or inherited environment variables:
env -i zsh -f
This command works as expected:
% echo abc > /dev/null
% # no output
However, adding another pipestage to it is unexpected:
% echo abc > /dev/null |cat
abc # whoa!
If I redirect stdout to a file I seem to get some `tee`-like behavior for free:
% echo abc >x |cat
abc
% cat x
abc
Is this somehow expected behavior? I've tested it on the following
systems and gotten identical results:
1. zsh 5.7.1 (x86_64-apple-darwin18.2.0) on Mac OS 10.14.5
2. zsh 5.4.2 on Ubuntu 18.04
(Please explicitly include my email address in responses.)
Thank you,
Kartik
http://akkartik.name/about
next reply other threads:[~2019-05-31 3:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 3:35 Kartik Agaram [this message]
2019-05-31 4:33 ` Philippe Troin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANOtCLXNrgX+-wds6gAdm0LRJxZGUKJc3ZVOeVJhCGBGAaxdTw@mail.gmail.com \
--to=akkartik@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).