📅  最后修改于: 2022-03-11 14:58:46.747000             🧑  作者: Mango
expect {
"Input 1" { send -- "$env(input1)\r"; exp_continue }
"Input 2" { send -- "$env(input2)\r"; exp_continue }
# Only this bit is necessary
"password for" { stty -echo
interact -u tty_spawn_id -o "\r" return
stty echo
exp_continue }
# Up to here
eof
}