* controlling xterm by "expect"
@ 1997-11-26 18:39 dyang
0 siblings, 0 replies; only message in thread
From: dyang @ 1997-11-26 18:39 UTC (permalink / raw)
To: tru64-unix-managers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-11-26 18:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-11-26 18:39 controlling xterm by "expect" dyang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox