From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,accb6b3074713b71,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 2002-09-06 07:35:18 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: t-mitsui@mbj.nifty.com (tak) Newsgroups: comp.unix.osf.osf1 Subject: tcl exect stop Date: 6 Sep 2002 07:35:17 -0700 Organization: http://groups.google.com/ Message-ID: <1baa7952.0209060635.8f9cba0@posting.google.com> NNTP-Posting-Host: 218.217.50.57 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1031322917 17902 127.0.0.1 (6 Sep 2002 14:35:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 6 Sep 2002 14:35:17 GMT Xref: archiver1.google.com comp.unix.osf.osf1:134 I use tru64(V5.1A) UNIX I made expect(5.31) script like below tcl version is 8.3 #!/usr/local/bin/expect set PROMPT $ spawn telnet PS1 #----------------------------------------- expect "login:" send "abcde\r" #----------------------------------------- expect -ex "Password:" send "password\r" #----------------------------------------- expect $PROMPT for {set cnt 0} {$cnt < 10} {incr cnt} { send "ls -a abcde\r" expect { "No such file or directory" { expect $PROMPT continue } $PROMPT { break } timeout { puts TIMEOUT continue } } } #----------------------------------------- send exit\r #----------------------------------------- Actually file abcde is not exist.(this is test script) About halfway,send command don't work. So expect script repeat timeout and end.(sometimes freeze) I take debugging, send "ls -a abcde\r" don't reach remote host. So expect is timeout. Please give me something to resolve this problem.