From: "Dan B." <danb@kempt.net>
To: cygwin@cygwin.com
Subject: Re: piping input to executable reading from /dev/tty?
Date: Wed, 20 Jun 2012 21:22:00 -0000 [thread overview]
Message-ID: <4FE23EB0.2020406@kempt.net> (raw)
In-Reply-To: <4FE1FD33.3070009@redhat.com>
Eric Blake wrote:
> On 06/20/2012 10:33 AM, Dan B. wrote:
>> Is there any way to redirect /dev/tty similarly to how stdin can be
>> redirected (e.g., like "echo ... | someexecutable")?
>
> Yes; use 'expect'.
>
>> Does Cygwin (or Unix/Linux, for that matter) have any equivalent way
>> of redirecting /dev/tty?
>>
>> Can /dev/tty be redirected at all? (I would guess that something
>> could be done with pseudoterminals, but I know very little about
>> them.)
>
> Yes, 'expect' is the command line tool that lets you script around
> programs that expect to be run interactively, but where you want to
> script the input that your program will see.
Does expect use only redirection of file descriptors, or can it also
redirect references to /dev/tty?
Daniel
--
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
next prev parent reply other threads:[~2012-06-20 21:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 16:34 Dan B.
2012-06-20 16:41 ` Eric Blake
2012-06-20 21:22 ` Dan B. [this message]
2012-06-20 21:26 ` Eric Blake
2012-06-21 11:35 ` Earnie Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FE23EB0.2020406@kempt.net \
--to=danb@kempt.net \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).