|
/usr/bin/expect <<EOD
spawn ssh root@${Base_IP} "\[ -d ${BRDPKGDIR} \] && rm -rf ${BRDPKGDIR}; mkdir -p ${BRDPKGDIR};"
for {} {1} {} {
expect {
"*(yes/no)?" { send "yes\r" ; continue }
"*assword:" { send "junge\r" ; continue }
-re . { exp_continue }
eof { break }
}
}
EOD |
|