I have a switch (CLI based) that takes me to the present STP setting when you hit the alphabets (which iam able to automate with tcl) but when it comes to changing the STP setting say from RSTP to MSTP, manually, I have to hit the up arrow and down arrow keys( only option available).
I need help to give the up arrow and down arrow commands in tcl format to automate it.
I read about rlwrap but thats more of history/ file editing which may not be helpful for me. I have tried the " ^[[A" and "[A" options and hexacodes with no success.
I have tried "\u001b[A" etc but the value STP does not change. The CLI is A XML CLI. This is my script . spawn telnet $DUT1_IP expect "login:" send "$user\r" expect "Password:" send "$password\r" expect "sh-3.2#" #sleep 2 send "xml_cli\r" expect ">> " send "bridge_config_mode = STP"
If i have to change mode STP to MSTP i need to use up arrow key in my keyboard to change it to MSTP /RSTP . how to use in expect to handle the same . Please give your thoughts if we can use shell scripting for the same (or any other).
Thanks and Regards Mo