delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/20/17:22:37

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_THREADED,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4FE23EB0.2020406@kempt.net>
Date: Wed, 20 Jun 2012 17:20:48 -0400
From: "Dan B." <danb AT kempt DOT net>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: piping input to executable reading from /dev/tty?
References: <4FE1FB4F DOT 3020808 AT kempt DOT net> <4FE1FD33 DOT 3070009 AT redhat DOT com>
In-Reply-To: <4FE1FD33.3070009@redhat.com>
Received-SPF: Pass (sender authenticated); receiver=punctilious.kempt.net; client-ip=173.79.157.238; envelope-from=<danb AT kempt DOT net>
Received-SPF: Pass (sender authenticated); receiver=punctilious.kempt.net; client-ip=173.79.157.238; helo=[192.168.1.11]
X-IsSubscribed: yes
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

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

- Raw text -


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