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:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; q=dns; s=default; b=eHNhemg /RKdlNHvV0JFcbVZ0cpAW/3L9B0LsXntQ8x0cQryQz2zcoWfhce0k9MOn+4bj7VS dvmU0nzdiNRL8Z3/bWC9p/a7wanLb4tHAwYD2+WSozrdR/px+6iKeedVbp5UFZ9T /16N0RDOsrYr33meuCmIJDXRXIz3xE8f64Bg= 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:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=default; bh=hcWvI3MdxAuqP PVIjR1JNd247t4=; b=abkhnuKbrkCCsBoNuDNyaJp4ClQsbenkO5wsfwx7sEe8k 9KaHOJ0kK6uJZQKw0bhDkP0arueQhKyhi+nxHE4itYk2SEPO3gvU97we3GS+TiZV J+I369cCcOl/FEZ6X/j0zSxHkSHT7yKkr/3xnU+7WA+pxI5rSMOLO8l4RGiQm0= 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-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=oh, H*c:alternative, extensively X-HELO: mail-ed1-f53.google.com MIME-Version: 1.0 References: <6cc83f4b-b0b1-d5c9-8d59-94c51382e4e3 AT gmail DOT com> In-Reply-To: <6cc83f4b-b0b1-d5c9-8d59-94c51382e4e3@gmail.com> From: David Karr Date: Wed, 5 Dec 2018 06:57:50 -0800 Message-ID: Subject: Re: Redirecting stderr to stdout through pipe doesn't work the way it does in Linux To: The Cygwin Mailing List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes On Tue, Dec 4, 2018 at 12:52 PM Marco Atzeri wrote: > Am 04.12.2018 um 21:41 schrieb David Karr: > > "CYGWIN_NT-6.1 WACDTL03DK068X 2.9.0(0.318/5/3)" > > > > I installed a version of "kubectl" for windows, and I use it extensively > in > > Cygwin bash for scripting command-line automation. In general, this works > > perfectly fine. I even use the same scripting in a Linux VM. > > > > I'm seeing an issue with one script that works fine in the Linux VM, but > > not in Cygwin. > > > > The command line is approximately this: > > > > kubectl exec pod -c container -i -t -- grep "string" > stuff.properties > > 2>&1 | sed -e 's/^propname=//' > > > > In Linux, this works perfectly fine. In Cygwin, it says "stdout is not a > > tty". > > > > I haven't updated my local Cygwin installation for quite a while. I'd > > prefer not to, unless there is a strong chance this kind of thing would > be > > fixed. > > > > as kubectl is not a Cygwin program, it is not aware of cygwin pty. > You can try to use winpty to overcome the problem. > > https://github.com/rprichard/winpty > > > > Oh. Senior moment. I actually already knew that. In fact, I even have another scripting element calling "exec" already using winpty. Thanks for the reminder. -- 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