delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 |
X-Spam-Check-By: | sourceware.org |
X-Yahoo-SMTP: | Uu383n6swBCEN1G9up0WSnxbvN8fCPmk |
Message-ID: | <4C7FC3B4.1060606@cygwin.com> |
Date: | Thu, 02 Sep 2010 11:33:08 -0400 |
From: | "Larry Hall \(Cygwin\)" <reply-to-list-only-lh AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 |
MIME-Version: | 1.0 |
To: | Cygwin List <cygwin AT cygwin DOT com> |
Subject: | Re: simulating console input |
References: | <20100902074703 DOT GA11464 AT gaston DOT couberia DOT bzh> |
In-Reply-To: | <20100902074703.GA11464@gaston.couberia.bzh> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.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ünster wrote: > Hello, > > I would like to run a Dos program, that needs keyboard input (just one "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 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. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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 |