Tru64 Unix
1747993 會員
5148 線上
108756 解決方案
發表新文章

分享我的知識 : expect 的使用及安裝

 
watermelonyu
教授

分享我的知識 : expect 的使用及安裝

1)安裝

# rpm -ivh cygnus_expect-99r1-4.alpha.rpm

cygnus_expect #########################################

軟體在open source 光碟裡面

2)

cat test.sh

#!/usr/bin/expect

spawn telnet 172.16.12.52

expect "login:"

send "root\r"

expect "Password:"

send "manager1\r"

send "uname -a\r"

send "uname -n\r"

interact

這樣執行test.sh就可以不用敲帳號密碼就可以login 到另一機器執行command 了
3則回覆 3
watermelonyu
教授

分享我的知識 : expect 的使用及安裝

請問網站中有沒有可以下載expect for Tru64?
watermelonyu
教授

分享我的知識 : expect 的使用及安裝

you can check following links for download expect package.



http://expect.nist.gov/

http://expect.nist.gov/src/

or

http://rpmfind.net
watermelonyu
教授

分享我的知識 : expect 的使用及安裝

> 請問網站中有沒有可以下載expect for Tru64

See

http://h30097.www3.hp.com/demos/ossc/html/0Welcome.htm



From the readme has included the kit as below:

cygnus_expect tk8.0 tcl8.0 expect5.26 from the Cygnus GNUPro Toolkit Release 99r1



Best regards,

Richard.