delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/08/08/10:21:05

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:date; q=dns; s=
default; b=Bo3DYG0z2iKbkKKHmy2kkEotqFX6diErk5hOGItapG1Lc0Ik41TYy
jXPHN25QqDxUep7sNSu9DJ/DvTnAHnQlH1Y+MOv+ilf2xXBClEbZ8oYcRmv/r4my
glgQUFChv00aR4PihwHr0DkhPX3PiaC4srwSMbOPmn5/DUmz3uxaWA=
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:date; s=default;
bh=9ZGDVJAMV2WiAvZQTQRosEa0tDA=; b=SmIIqceIp+cWKxWqXTx2jvnKIOFm
ZEODAbaddDyXw5KCpmQ2FtugVRTAMr+gp5G/pICVrS7VfbFtVqfOUuf6c4IaYtXG
TjYyqPHRhnxN8wsIeXZGALSkUmvEszv8W+8f07G1fzLDI1iyY1trLaLVnIC4IwCC
lAjg46glkvGZt1s=
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.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:353
X-HELO: out1-smtp.messagingengine.com
X-ME-Sender: <xms:uMiJWZ9annGKim2aFA2wloCmGrVMxysz-YXmvnwgTCA7NGBMbCzGiw>
Message-Id: <1502202040.3980767.1066870536.244CE4BA@webmail.messagingengine.com>
From: Ronald Fischer <ynnor AT mm DOT st>
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
Date: Tue, 08 Aug 2017 16:20:40 +0200
X-IsSubscribed: yes

> 
> 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

--
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