X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:in-reply-to :references:date; q=dns; s=default; b=FuLJ6CgkkoWTyMNBG3LzBAHBYG BCr9o2pBm7zZcjxJ/8Z7upXNjfEA79Hd6n67ZlHo1tJcCiXtFWaPpplb2reGbG+1 qVyAzUlUIuPoJCvjy07Teny8diZM38vna3QJW+KMM5SMLAF2eTQKrPLCakayLBlW Sq52h9rNU12L0aTMM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:from:to:mime-version :content-transfer-encoding:content-type:subject:in-reply-to :references:date; s=default; bh=Debi1UIWoht8SztqbP8O/dSsmc4=; b= LxkO/pcTjcXP9Hce3EJ+dj72AUURCozUtIDAJ1ZZAAPVxoD50E42sVIvrqvxA/8V PaCpHXJOm6oACST6XBBWk8+PKuELN+qbut2Ul+GwnDdvzmEMTNpuVh3Fm6r8/iw3 mhQAchBBbby2lRc+7DbO90Xp+VidGOq9FTffmZ9hb+o= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=subshell, cmbination, Fischer, ronald X-HELO: out1-smtp.messagingengine.com X-ME-Sender: Message-Id: <1502202013.3980759.1066868456.6AADBA6A@webmail.messagingengine.com> From: Ronald Otto Valentin Fischer To: Wouter van Doorn , cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" Subject: Re: bash pipe fails in script with subshell/loop cmbination In-Reply-To: References: Date: Tue, 08 Aug 2017 16:20:13 +0200 > > TWO - this fails, apparently (warning: my guess) at the pipe > $ for j in 1 2;do echo $j $(echo hello | cat);done > 1 > 2 This works for me: $ for j in 1 2;do echo $j $(echo hello | cat);done 1 hello 2 hello I have: GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin) Ronald -- Ronald Fischer http://www.fusshuhn.de/ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple