I am having a problem figuring out how to handle an error condition.
if the password is not accepted and I receive a Permission denied.
That condition could be met in any of the possibilities.
tks in advance for help
Code:
{
"yes/no" {
send "yes\n"
expect -re "assword"
send "$tacpswd\r"
}
"sername" {
send "$taclnam\r"
expect -re "assword" {
send "$tacpswd\r"
}
}
"assword" {
send "$tacpswd\r"
expect ">"
send "enable\n"
expect "assword:"
send "$tacpswd\n"
}
default {
puts "Login FAILED\N"
continue
#exit
}