Fer*_*SBS 0 bash bash-scripting expect
这是代码(bash脚本):
echo "Pass for router:"
read -s pass
/usr/bin/expect <<EOD
spawn ssh 192.168.10.1 -l root 'opkg list-installed' > list-installed.txt
#echo @pass
expect "*password:*"
send "$pass\r"
interact
EOD
Run Code Online (Sandbox Code Playgroud)
问题是它什么都不返回。它不会创建本地文件“list-installed.txt”
这可能有什么问题?