From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45458 invoked by alias); 23 Aug 2016 17:40:12 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 45449 invoked by uid 89); 23 Aug 2016 17:40:11 -0000 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 Received: from mail-it0-f45.google.com (HELO mail-it0-f45.google.com) (209.85.214.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Aug 2016 17:40:01 +0000 Received: by mail-it0-f45.google.com with SMTP id e63so161996099ith.1 for ; Tue, 23 Aug 2016 10:40:01 -0700 (PDT) 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) Received: from [192.168.0.12] (d27-96-48-76.nap.wideopenwest.com. [96.27.76.48]) by smtp.gmail.com with ESMTPSA id d68sm1745572ith.10.2016.08.23.10.39.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Aug 2016 10:39:59 -0700 (PDT) Subject: Re: #!/bin/sh and #!/bin/bash is not the same To: cygwin@cygwin.com References: From: cyg Simple Message-ID: Date: Tue, 23 Aug 2016 22:19:00 -0000 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 X-SW-Source: 2016-08/txt/msg00439.txt.bz2 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