cancel
Showing results for 
Search instead for 
Did you mean: 

Script synax that waits on user input before committing changes?

Script synax that waits on user input before committing changes?

Stephen_Stormon
Contributor
We want to create a script that will do the following:

show port 5:2,6:1 info
Wait for user to answer if the ports shown are the correct ports to be disabled
If yes execute "disable port 5:2,6:1", then execute "save config"
If no abort

I haven't been able to find a tcl example that incorporates waiting for user input with a if/then.

5 REPLIES 5

Dorian_Perry
Extreme Employee
Hi Stephen,

I think you may be looking for the Built-In Function: $READ(prompt)

#Example:
set var CLI.OUT " "
show port 5:2, 6:1 information
show var CLI.OUT

set var answer $READ(Are these the correct ports to be disabled?)

#logic based on input

GTM-P2G8KFN