www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/08/08/10:20:34

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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: <xms:nciJWVGC3D9sKa_O3T0rXFoA75C07xIvarmQOe7EAObhXD6-3ARoGg>
Message-Id: <1502202013.3980759.1066868456.6AADBA6A@webmail.messagingengine.com>
From: Ronald Otto Valentin Fischer <ashi DOT niwatori AT the-quickest DOT com>
To: Wouter van Doorn <vandoornw AT gmail DOT com>, cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: Re: bash pipe fails in script with subshell/loop cmbination
In-Reply-To: <CANZ2p_cQ=A3YShSSLT43=nvuSv-cBeTeOipivaqUf9XSiqyWcA@mail.gmail.com>
References: <CANZ2p_cQ=A3YShSSLT43=nvuSv-cBeTeOipivaqUf9XSiqyWcA AT mail DOT gmail DOT com>
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 <ronald DOT fischer AT fusshuhn DOT de>
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019