From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99039 invoked by alias); 14 Jun 2017 07:41:49 -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 97163 invoked by uid 89); 14 Jun 2017 07:41:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=arrow, HX-Received:Wed, instincts, keys X-HELO: mail-pg0-f45.google.com Received: from mail-pg0-f45.google.com (HELO mail-pg0-f45.google.com) (74.125.83.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Jun 2017 07:41:46 +0000 Received: by mail-pg0-f45.google.com with SMTP id k71so72047614pgd.2 for ; Wed, 14 Jun 2017 00:41:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=kPPWwOzSdwZhDgY05icWaUDJm+XRZ6Noxuojo8DwKUE=; b=qe2molT5Bf640jY16tYtH+m4p2h+BGnHblz8lFTPGrv3+Ms4ElpiogSUp/xybnBcUX I0e6QLkFhoSNVuCiOgholUqMW9+LggQN/7pS2sP6wzJkJDYB33baL+2K2KktY6VZsVtG 2dPBq4y9MN26kb+QxBGNUNC4rZD/vsFs3On0iTcHTfwxo0EHAC2Nz4J9EbMkVOqVamw7 qezGNadyUS8TKU7w/fe0HsCGHj2LJIoQvC4vX004ZBqueSG+fZ8AzKHC/T0HMvOk46dM wIfXRl7pFQAd/hsnM7wAAYvrLrxcwvYLRE3cMlMzlx7VrzIYlclMZA28SCq08qrFFuBc n9aQ== X-Gm-Message-State: AKS2vOxVQ+7ZLqJFOxcBoXOOyoAatZtGLw7UDA7yqYDGCbPf2bDVCNak o39fB+U7NnJApJasbfT5T7CFpmlVVWHg6pSoSQ== X-Received: by 10.84.195.1 with SMTP id i1mr3556135pld.120.1497426109787; Wed, 14 Jun 2017 00:41:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.183.71 with HTTP; Wed, 14 Jun 2017 00:41:49 -0700 (PDT) From: Jon Bord Date: Wed, 14 Jun 2017 07:41:00 -0000 Message-ID: Subject: Pipe after Command Substitution does not resolve the substitution: To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-06/txt/msg00142.txt.bz2 Hi, This is the first time i've ever submitted a bug report so i hope the below is ok. I am not a programmer although i do do some scripting. The below is the kind of 'command substitution then pipe' that i often used in Cygwin on Windows 7. Now that i've been forced to move to Windows 10 it no longer seems to work. I'm assuming that this is not a feature of an upgraded Bash but maybe i'm wrong, eg maybe we are now supposed to put everything in variables rather than use command substitution. Windows 10 bash 4.4.11(2) and 4.4.12(3) $ set -xv (EXAMPLE 1: COMMAND SUBSTITUTION WORKS AS EXPECTED) $ grep 2 $(ls | tail -1) grep 2 $(ls | tail -1) ++ ls ++ tail -1 + grep 2 test.txt 2 23 (EXAMPLE 2: HANGS) $ grep 2 $(ls | tail -1) | grep 3 grep 2 $(ls | tail -1) | grep 3 + grep 3 + grep 2 (EXAMPLE 3: HANGS) $ grep 2 `ls | tail -1` | grep 3 grep 2 `ls | tail -1` | grep 3 + grep 3 + grep 2 Would it be correct to conclude from the above output that once the pipe is added then it is ignoring the substitution? SPECULATION: i had wondered if the cause was a change in version of bash but i cannot be sure what the version was that i was using on Windows 7. I wish i had a record. I've tried this on both 4.4.11(2) and 4.4.12(3). My instincts are that it is not, that it is Cygwin (or more precisely bash.exe?) on Windows 10 instead. I have noticed other differences / problems, eg arrow keys behaving oddly in vi, and general sluggishness (but not tested yet). Many thanks for any help and i hope this can contribute to keeping Cygwin strong. -- 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