* Command echo
@ 2015-11-16 16:16 Gluszczak, Glenn
2015-11-16 16:40 ` Buchbinder, Barry (NIH/NIAID) [E]
0 siblings, 1 reply; 3+ messages in thread
From: Gluszczak, Glenn @ 2015-11-16 16:16 UTC (permalink / raw)
To: cygwin
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.
$ bash --version
GNU bash, version 4.3.42(4)-release (i686-pc-cygwin)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ cmd
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\cygwin\home\mytest>whoami
whoami
mytest
C:\cygwin\home\mytest>dir
dir
Volume in drive C has no label.
Volume Serial Number is 0EA8-F3D1
Directory of C:\cygwin\home\mytest
11/11/2015 09:31 AM <DIR> .
11/11/2015 09:31 AM <DIR> ..
11/05/2015 05:55 AM 6,054 .bashrc
11/11/2015 09:45 AM 2,401 .bash_history
11/05/2015 05:55 AM 1,494 .bash_profile
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Command echo
2015-11-16 16:16 Command echo Gluszczak, Glenn
@ 2015-11-16 16:40 ` Buchbinder, Barry (NIH/NIAID) [E]
2015-11-16 18:54 ` Andrew DeFaria
0 siblings, 1 reply; 3+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2015-11-16 16:40 UTC (permalink / raw)
To: cygwin; +Cc: 'Gluszczak, Glenn'
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.
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Command echo
2015-11-16 16:40 ` Buchbinder, Barry (NIH/NIAID) [E]
@ 2015-11-16 18:54 ` Andrew DeFaria
0 siblings, 0 replies; 3+ messages in thread
From: Andrew DeFaria @ 2015-11-16 18:54 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-16 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 16:16 Command echo Gluszczak, Glenn
2015-11-16 16:40 ` Buchbinder, Barry (NIH/NIAID) [E]
2015-11-16 18:54 ` Andrew DeFaria
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).