delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-0.3 required=5.0 tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
In-Reply-To: | <4C7FC3B4.1060606@cygwin.com> |
References: | <20100902074703 DOT GA11464 AT gaston DOT couberia DOT bzh> <4C7FC3B4 DOT 1060606 AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
MIME-Version: | 1.0 |
Subject: | Re: simulating console input |
X-KeepSent: | 908B5DCD:CC6A54F1-85257792:0074780B; type=4; name=$KeepSent |
Message-ID: | <OF908B5DCD.CC6A54F1-ON85257792.0074780B-85257792.0074F175@lnotes-gw.ent.nwie.net> |
From: | RISINGP1 AT nationwide DOT com |
Date: | Thu, 2 Sep 2010 17:17:18 -0400 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
>On 9/2/2010 3:47 AM, Peter M=FCnster wrote: >> Hello, >> >> I would like to run a Dos program, that needs keyboard input (just one= =20 "Y"), >> automatically via "make" in an ssh-session. >> >> How could I simulate the "Y" keypress? >> >> "echo Y | DosProgram.exe" does not work... >> >> The keypress is accepted only in a dos-console. > >Read < http://cygwin.com/cygwin-ug-net/using-effectively.html#using-console>. >Then add this fact - the SSH server uses ptys. So your program will not >work with a single character put in the input buffer. One could >envision using 'yes' to fill the buffer of the pipe that the Windows=20 program >interprets the pty to be. Perhaps a nicer alternative is to build the >problematic program with Cygwin, if that's an option, so that it will >understand the pty. Would an inline document work? DosProgram.exe <<! Y ! - Phil ____________________________________________________________________ Phil Rising, Principal Consultant for Sogeti USA, LLC Contracted to Nationwide, Corporate Internet and Contact Center Solutions= =20 Team (Work) (614) 677-7445, (Fax) (614) 677-7046 Alternate email: Phil DOT Rising AT us DOT sogeti DOT 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |