piping input to executable reading from /dev/tty?
Dan B.
danb@kempt.net
Wed Jun 20 21:22:00 GMT 2012
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
More information about the Cygwin
mailing list