delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/10/25/01:58:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: =?ISO-8859-1?Q?Ren=E9_Berber?= <r DOT berber AT computer DOT org>
Subject: Re: Redirecting Console Input
Date: Sat, 25 Oct 2008 00:57:31 -0500
Lines: 27
Message-ID: <gducg4$itc$1@ger.gmane.org>
References: <49029EC2 DOT 5050700 AT veritech DOT com>
Mime-Version: 1.0
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
In-Reply-To: <49029EC2.5050700@veritech.com>
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

Lee D.Rothstein wrote:

> Is there a way to redirect console input /to/ (actually /from/ ;-) ) a
> file, for say a Vista
> console (CLI) command like 'sc'?

=46rom a recent post 'ttyfier' is probably the answer, the post is:

http://sources.redhat.com/ml/cygwin/2006-03/msg00164.html

which has a link to the source code.

> I've tried:
>=20
>    sc <Ys.in >sc.help.txt

There is a tool in coreutils called yes, it outputs a stream of 'yes',
so usually (but not with windows console programs) one would do 'yes |
program &> log.txt'

> Where 'Ys.in' is a file containing a bunch of 'Y's, which is what 'sc'
> is waiting for.
> 'sc' ignores the file and waits for me to type 'Y', before it
> resumes the help output to stdout.
[snip]
--=20
Ren=E9 Berber


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019