From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79648 invoked by alias); 16 Nov 2015 18:54:30 -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 79636 invoked by uid 89); 16 Nov 2015 18:54:29 -0000 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,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 16 Nov 2015 18:54:28 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZyOut-0005SC-TC for cygwin@cygwin.com; Mon, 16 Nov 2015 19:54:16 +0100 Received: from 209.237.53.3 ([209.237.53.3]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Nov 2015 19:54:15 +0100 Received: from Andrew by 209.237.53.3 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 16 Nov 2015 19:54:15 +0100 To: cygwin@cygwin.com From: Andrew DeFaria Subject: Re: Command echo Date: Mon, 16 Nov 2015 18:54:00 -0000 Message-ID: References: <91DCAC3CB99C724EB365BB64677FBE7B01BE4B@MX204CL04.corp.emc.com> <6CF2FC1279D0844C9357664DC5A08BA21BC24FE1@msgb09.nih.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <6CF2FC1279D0844C9357664DC5A08BA21BC24FE1@msgb09.nih.gov> X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00225.txt.bz2 On 11/16/2015 08:40 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote: > Gluszczak, Glenn sent the following at Monday, November 16, 2015 11:16 AM >> >> When I shell to cmd.exe, the commands I execute are echoed (not sure if >> stdout or stderr). This doesn't happen under native cmd.exe. Is there a >> variable that controls this? I only have CYGWIN=nodosfilewarning >> >> Notice the commands "dir" and "whoami" are emitted to the output. > > cmd.exe is in control of its own echoing. Try starting as cmd /q > cmd /? > ... > /Q Turns echo off > ... > > As to why cmd behaves differently when started under bash (even in a > non-mintty window) than when started directly or under cmd .... > > Hope that helps. > > - Barry > Disclaimer: Statements made herein are not made on behalf of NIAID. Mintty (and ssh, etc.) use pty's. cmd does not understand pty's. So if you run say Cygwin's bash from a cmd window and then start cmd you will not get the echoing. If, however, you start cmd from a bash shell that is in a mintty window then you're using pty's and you'll get echoing. Likewise if you run bash in a cmd window, then say ssh to another machine, you're now using pty's and you'll see the behavior again. -- Andrew DeFaria http://defaria.com -- 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