From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <45644100.8010904@stc.donpac.ru> Date: Wed, 22 Nov 2006 15:22:24 +0300 From: Eugene Prokopiev User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: Community@lists.altlinux.org Content-Type: text/plain; charset=KOI8-R; format=flowed X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Nov 22 15:24:19 2006 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 77,45644173144951460410925 X-DSPAM-Factors: 27, send+С, 0.40000, остались+только, 0.40000, name+3, 0.40000, assword+send, 0.40000, Received*from+192.168.20.109, 0.40000, Received*Postfix+with, 0.40000, localdomain+on, 0.40000, Received*for+Community, 0.40000, Escape+character, 0.40000, мане, 0.40000, С, 0.40000, from, 0.40000, from, 0.40000, Content-Type*text+plain, 0.40000, 5+spawn, 0.40000, send, 0.40000, send, 0.40000, User-Agent*ru-RU+rv, 0.40000, Received*ESMTP, 0.40000, telnet+localhost, 0.40000, telnet+localhost, 0.40000, Connected+to, 0.40000, on+pts, 0.40000, Content-Transfer-Encoding*8bit, 0.40000, send+ls, 0.40000, send+ls, 0.40000, expect+nobrace, 0.40000 Content-Transfer-Encoding: quoted-printable Subject: [Comm] Expect X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Linux Community List-Id: ALT Linux Community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 12:24:35 -0000 Archived-At: List-Archive: List-Post: =FA=C4=D2=C1=D7=D3=D4=D7=D5=CA=D4=C5! =E5=D3=D4=D8 =D4=C1=CB=CF=CA expect-=D3=CB=D2=C9=D0=D4: #!/usr/bin/expect -f set timeout 5 spawn telnet localhost expect { "ogin:" { send -- "test\r" } timeout { abort } } expect { "assword:" { send -- "1\r" } timeout { abort } } expect { "\$" { send -- "ls\r" } timeout { abort } } expect { "\$" { send -- "exit\r" } timeout { abort } } exit 0 =F7=D9=D7=CF=C4: $ ./login.exp spawn telnet localhost Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. login: test Password: Last login: Wed Nov 22 15:15:13 2006 from localhost.localdomain on pts/7 -bash-2.05b$ invalid command name "abort" while executing "abort " invoked from within "expect -nobrace {$} { send -- "ls\r" } timeout { abort }" invoked from within "expect { "\$" { send -- "ls\r" } timeout { abort } }" (file "./login.exp" line 17) =F7=CF=D0=D2=CF=D3=D9: 1) =D0=CF=DE=C5=CD=D5 =D3=CB=D2=C9=D0=D4 =CE=C5 =C4=CF=D6=C9=C4=C5=D4=D3=D1= \$ ? 2) =D0=CF=DE=C5=CD=D5 abort (=CF=D0=C9=D3=C1=CE=CE=D9=CA =D7 =CD=C1=CE=C5= ) - invalid command name? 3) =CD=CF=D6=CE=CF =CC=C9 =D5=D0=D2=CF=D3=D4=C9=D4=D8 =CB=CF=C4, =D0=D2=C9= =CE=D1=D7 =DE=D4=CF-=D4=CF =D7=D2=CF=C4=C5 "timeout { abort }" =DA=C1=20 =D0=CF=D7=C5=C4=C5=CE=C9=C5 =D0=CF =D5=CD=CF=CC=DE=C1=CE=C9=C0, =DE=D4=CF= =C2=D9 =D7 =CF=D3=CE=CF=D7=CE=CF=CD =CB=CF=C4=C5 =CF=D3=D4=C1=CC=C9=D3=D8= =D4=CF=CC=D8=CB=CF expect =C9 send? --=20 =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =F0=D2=CF=CB=CF=D0=D8=C5=D7 =E5=D7=C7=C5= =CE=C9=CA