Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
pipelines transmitting data even after redirecting stdout
- X-seq: zsh-workers 44383
- From: Kartik Agaram <akkartik@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: pipelines transmitting data even after redirecting stdout
- Date: Thu, 30 May 2019 20:35:17 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=KXAczzQnASokF5D9UbUk46hX2XGJEWXpv173/Oh3ZQY=; b=GlGzeFUWggQYMx9g0XcK6umu8S+JGCwVUOgNZxB/EPPrj9stO0JS7O9gl5orXveM78 KOGSz6vit3SncHiFzfcUSD2h+5OExnaWqcfr0xTG3rThqNSbz0BmAHQm0A/OVLq/wneb s/vnt/quEDeF4k0upFJtu6+fbQfMiTSKxoTmoiKxXjCix/7sLDjEUp0vfu+LmhuAxf+m SEYlSaWENM35fMbSlETsqNQKygtIfr4RCKC7ZW4sVFS+rB3hACcd4hsdUHiqNUCOxdtn iJ9XOUXW6Ibvl6mHSPeXVwdt4KN+wltShjXN5jCfUWGg5wqN6gKsZ1DIuoIYGaHdUmju xpvA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author