ran into the same problem and after staring at the debug output for a while, moved the sending of the "\r" to after the expect block.<br><br><br> # we are logged in, now figure out the full prompt<br># send "\r"<br>
expect {<br> -re "\[\r\n]+" { exp_continue; }<br> -re "^.+$prompt" { set junk $expect_out(0,string);<br> regsub -all "\[\]\[]" $junk {\\&} prompt;<br>
}<br> -re "^.+> \\\(enable\\\)" {<br> set junk $expect_out(0,string);<br> regsub -all "\[\]\[]" $junk {\\&} prompt;<br>
}<br> }<br> send "\r"<br><br>and that seemed to have the desired result.<br>