This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Redirecting Console Input


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'?

From 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:
> 
>    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]
-- 
René 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]