一键安装expect

葛大爷 互联网 2019-06-12 290

一键安装expect

expect_install.sh
#/bin/bash
wget https://prdownloads.sourceforge.net/tcl/tcl8.6.9-src.tar.gz
tar zxvf tcl8.6.9-src.tar.gz
cd tcl8.6.9/unix
./configure --prefix=/usr/tcl --enable-shared
make
make install
cd ../
cp unix/tclUnixPort.h generic/
cd ../
wget https://jaist.dl.sourceforge.net/project/expect/Expect/5.45.4/expect5.45.4.tar.gz
tar zxvf expect5.45.4.tar.gz
cd expect5.45.4
./configure --prefix=/usr/expect --with-tcl=/usr/tcl/lib --with-tclinclude=../tcl8.6.9/generic
make
make install
ln -s /usr/expect/bin/expect /bin/expect