Hello,
I have an expect script which I copied from user "ktappe" and I want to integrate the $4-$11 variables so I don't have to change the script every time I need to change the password.
This example doesn't work. :-(
#!/usr/bin/expect -f
set newpassword $5
set oldpassword $6
spawn firmwarepasswd -setpasswd
expect {
"Enter password:" {
send "$oldpassword
"
exp_continue
}
"Enter new password:" {
send "$newpassword
"
exp_continue
}
"Re-enter new password:" {
send "$newpassword
"
exp_continue
}
}
Thanks!