Docker容器 纯图像:centos6.6 在bash之后,我安装这些: yum -y install tar zip unzip expect glibc.i686
已安装包期望-5.44.1.15-5.el6_4.x86_64和最新版本
并运行autoexpect,我总是收到这些错误:
[root@179314389a2c bin]# autoexpect
autoexpect started, file is script.exp
no such variable
(read trace on "env(SHELL)")
invoked from within
"spawn -noecho $env(SHELL)"
invoked from within
"if {[llength $argv]>0} {
eval spawn -noecho $argv
cmd "spawn $argv"
} else {
spawn -noecho $env(SHELL)
cmd "spawn \$env(SHELL)"
}"
(file "/usr/bin/autoexpect" line 315)
答案 0 :(得分:2)
似乎autoexpect
需要设置SHELL
env var,但是您当前运行的shell(不是bash
?)没有设置它。所以试试SHELL=bash autoexpect
。