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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=xHLr64DUSRptS6IR qCPOPw0UacdXU76fOj2hodshnm8L1tReEjD6Fo554UukZ2ZvbDT2ErKeUsUKTW7p 9JIglqMgguWN2u6TiK0sQbny0R9T7Fj9wVJ/hm7I0tSuj9yoXlPA6neB7vwGBN18 ZU6mLwLKvxeiufTIh4WPopYslTA= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=DN6Zoef67q5ZTFtyD5mO4g DSB3c=; b=Pyv1IfAy3y4WBwXU+tMwWnYrXIR0rokGKsyQtzmoW57O1keebK6yZB y+Jt6Idb6XrUkOLFY12zJ3rqdyUncCiWWRO+6xCK84VN+NacaPKqkmuz/LrxgAzU xaFeZ1Z4MGOiddmU0GOebYFkFuXBwsboC7gpjyjxYBIyS+AK+Hf+M= 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.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:Z86Fa5b, H*i:HTcYp8kgX4FFn, H*f:wQC, H*f:HTcYp8kgX4FFn X-HELO: mail-it0-f45.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=HcsA9mdM4mwff3ZtZs6Pu5Kp3Ixx0vZOvDg6FpB6Aws=; b=T/Srfl2OuE9MvxNTldMV/u2pNq5pBHEZgvjL8VvFVJd1O1XVK85AydzkWe+1aIHWZs UvFlTwWklgslCozLjQTu6znbSazvum9pciY1dIIDuCXIHHQknfrLpdV91Ct56CxOnpRt YSsEZvtrGIw0AFW7ee3Xfge9EUfsEn8xGa0MUCGSjtyD36OUFP281mVuT6w27HrPeKnH GXx1b2dYdq1gb4UkS/lHHnx3UjlBG2Zzrpbwh1nZMa2RWLBdkUQC5JX11H8xzxgXuKHu pI6jGFX6Ge+AbP3sW+5HccVbRQqRciNCivTZHgb89bSOlgTOXHLXd8Z0nG9w9YheoTSt X7bw== X-Gm-Message-State: AEkoouuJDlNs5PoY5DapFOaHXp8IZvf9YyNd88/rGk8TytZKjTOc03Ms/zOO7N4mH0TMsQ== X-Received: by 10.36.25.144 with SMTP id b138mr28006808itb.29.1471973999585; Tue, 23 Aug 2016 10:39:59 -0700 (PDT) Subject: Re: #!/bin/sh and #!/bin/bash is not the same To: cygwin AT cygwin DOT com References: From: cyg Simple Message-ID: Date: Tue, 23 Aug 2016 13:40:14 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes On 8/22/2016 3:31 PM, Morten Kjærulff wrote: > > This: > > date > echo a | while read ; do > sleep 3 & > done > wait > date > > will run in 0 seconds, with BOTH /bin/sh and /bin/bash > > This: > > date > while read ; do > sleep 3 & > done < <(echo a) > wait > date > > will run in 3 seconds with /bin/bash and get syntax errors with /bin/sh: > syntax error near unexpected token `<' > `done < <(echo a)' > See http://stackoverflow.com/questions/12120598/syntax-error-in-shell-script-with-process-substitution for the answer to your quandary. -- cyg Simple -- 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