Problem using Xterm in Expect script
- From: "Girish" <girish.14@xxxxxxxxx>
- Date: 17 Aug 2005 06:08:17 -0700
Hi,
I have written a script which will spawn an xterm and executes the
specified expect script .I wanna know how can i pass an interrupt
signal to the spawned xterm to stop the test1 and then switch to
test2.Plz do reply.
Here is my script.when i execute the script s1.exp .Everything goes
fine ,in the "quall" procedure i check for an error 60 sec if it
doesn't occcur then i want to stop the "quall test" and switch to the
"rwc test"
-------------------------------------------------------------------------------
s1.exp
#!/usr/bin/expect
spawn xterm -e sdauto.exp mmc11;sleep 2
spawn xterm -e sdauto.exp mmc12;sleep 2
spawn xterm -e sdauto.exp mmc13;sleep 2
sdauto.exp
#!/usr/bin/expect
spawn $env(SHELL)
set machine [lindex $argv $i]
proc remotelogin {machine} {
send "rsh $machine -l local\r"
set timeout 20
expect -ex "Password: "
send "local\r"
expect "local*"
}
proc quall {} {
#qualloop test
send -- "quall -i=150 -b=250 -e=100 -t=2\r"
set timeout 60
expect "Error*" {puts "----quall FAILED------"}
send -h "^C"
#-------------------------------------------------------------------after
executing ctrl C the Xterm is closed ,but i wanna stop quall test and
got to rwc test
expect "local@*"
}
proc rwc {} {
send -- "rwc.py -fmc.config\r"
set timeout 60
expect "Error"
send -h "^C"
expect "local*"
}
remotelogin $machine
qualloop
rwc
--------------------------------------------------------------------------------
Regards
Girish
.
- Prev by Date: Re: question on regular expressions
- Next by Date: Re: Progressbar file copy
- Previous by thread: question on regular expressions
- Next by thread: Dust Mote Web Server
- Index(es):
Relevant Pages
|