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=nPqn/fNn2aqoAPj7 7cSQnNyLljOd2jEz2b/WZhoUyIsUyylzbOyhw9De98vc7TqVgRBR+P5Tpk0nJlYN k73jnZaXhKQnrjLYMlCtg3GaMQit2WNZbFpmV4wX3XwGI8W8/BSqF/GMXUanez30 sFLhouEaiYjWNADwrZD4K5VlUOk= 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=rrCkpv4aYHekK92HjNTvPP KpGUw=; b=Tkiyy6XznM0ivi7aaPVR7TcBHBQHj/tTWnTNizmwAhBiUgtYzi5dSA yBAHirACcmo5HoYeWqp1qZJjDQ9DL/z0rjCmTkNxxYinXlWyQXZ6y/MqBzed/+kZ xPjZ9urY3E9BFSvSK4mGcOWT1fmCrjCOHCGjiwQegGBIjnuJvvU6k= 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=1.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:904, reproduction, say-something.sh, 4.4.12 X-HELO: mail-wr0-f175.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=DvX9jHsD6+en/iU0im0a0UiTar/JOcLNmaJQ/ovfNIc=; b=dktfKrNj9AaLWBzjMrV4MPrIBm25f+3u44BoxtWtDKq+W7PMd33ODSKPUXOol9fOno zPHJNrhOFIcHoQ9rwZvja0J2tfSHN13PZuooJsq4iXMEmjOtaJkDDOIy15rjZNWefMnL M2KGUtRP4o1eb6zjq560XUpMNd8A/SZ3XrpjtkidfM6HIGQdto1+QuAXpnQpYhFFXEaz dtuodCWivFLzlkjvrJgNrpiU+jvrFZmChsntDSGk319P8gLT6YVB3HV8sdHJj30RQFUl gZ4Kdiag0vxUneuqFIfDQc/stP+5Y+4+gdamJa45lU+562xVHorsL6y0FylAhJutbfv+ znvw== X-Gm-Message-State: AIVw111TcFtcwyooRe68jrTv9rMbeuE91Wpm0plY9c7XFa+6hWW/yHCO QHoxdIrQQ+D+Pd6S X-Received: by 10.28.127.14 with SMTP id a14mr6863607wmd.91.1499672353659; Mon, 10 Jul 2017 00:39:13 -0700 (PDT) Subject: Re: /dev/stderr invalid with nested and chained redirections To: cygwin AT cygwin DOT com References: <76d702928e575369da13a1fce2fe4291 DOT squirrel AT mail DOT schneiderp DOT de> From: Marco Atzeri Message-ID: <7532f52a-89de-9fde-e8a6-b93aad54f7df@gmail.com> Date: Mon, 10 Jul 2017 09:39:12 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <76d702928e575369da13a1fce2fe4291.squirrel@mail.schneiderp.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 10/07/2017 09:18, cygwin-mailinglist wrote: > I have a script which does not find /dev/stderr when its stderr is > redirected and piped. The minimal reproduction follows below. This is a > verbatim copy from the terminal with edited-in comments prefixed with > hashes. > > $ uname -a > CYGWIN_NT-6.1-WOW xxxxxxxx 2.8.1(0.312/5/3) 2017-07-03 14:06 i686 Cygwin > $ bash --version > GNU bash, version 4.4.12(3)-release (i686-pc-cygwin) > [...] > ######################################################## > $ cat say-something.sh > #!/bin/sh > echo something > /dev/stderr > ######################################################## > > ############### This is the error: > $ (x=$(./say-something.sh 2> /dev/stderr)) |& cat > ./say-something.sh: line 2: /dev/stderr: No such file or directory I miss the need to redirect stderr "2>" to itself. -- 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