Answering prompts in command scripts

  • 25 October 2013
  • 5 replies
  • 214 views

Attempting to cancel reset through a command script. Although this issue could potentially happen when answering any yes/no prompt. Script: set length 0 reset cancel @receive 2 @key y @endofline crlf show reset exit Result: K6(su)->set length 0 K6(su)->reset cancel This command will cancel 1 scheduled reset. Do you want to continue (y/n) [n]?yshow K6(su)-> K6(su)->

5 replies

Update: If I change the script to: set length 0 reset cancel @receive 2 @key y @endofline crlf exit Result: K6(su)->set length 0 K6(su)->reset cancel This command will cancel 1 scheduled reset. Do you want to continue (y/n) [n]?yexit K6(su)-> K6(su)->
Userlevel 2
Hi Jeff, Maybe you can give us a little bit of commentary here. What exactly is the problem you are trying to resolve?
I am attempting to cancel a scheduled reset on several switches. I am assuming that in attempting to do anything else that asks for a y/n answer would have the same issue.
Userlevel 4
Hi Jeff, Try this: set length 0 reset cancel y show reset exit Result: SSA->reset cancel This command will cancel 1 scheduled reset. Do you want to continue (y/n) [n]?y Reset cancelled. SSA(su)->show reset No Reset scheduled SSA(su)->exit By putting the different commands on different lines I believe it implied a newline at the end.
That works. I don't know why I did not try that. Thanks!

Reply