tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: dyang () buckeye ! cb ! lucent ! com
To: tru64-unix-managers
Subject: controlling xterm by "expect"
Date: Wed, 26 Nov 1997 18:39:05 +0000	[thread overview]
Message-ID: <96078619210714.tru64-unix-managers.marc@archive.invalid> (raw)

I was trying to use "expect" to bring up a new xterm
and control it -- get input and send output.
I ran it on DU 4.0A.

The following is the script I used:

======================================================
#!../expect --
spawn -pty 
stty raw -echo < $spawn_out(slave,name)
regexp ".*(.)(.)" $spawn_out(slave,name) dummy c1 c2
if {[string compare $c1 "/"] == 0 } \
    { set c1 "0" }
puts "$dummy $c1 $c2 $spawn_out(slave,name)\r\n"
set pid [exec xterm -S$c1$c2$spawn_out(slave,fd) &]
close -slave
======================================================
 

And, I got output as the following:
======================================================
spawn 
/dev/pts/6 0 6 /dev/pts/6

# xterm: Error 11, errno 9: Bad file number
======================================================


Anybody has any exerience about it?

Thanks,
Daniel

---------------------
Daniel Yang
dyang@buckeye.cb.lucent.com

                 reply	other threads:[~1997-11-26 18:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox