Script synax that waits on user input before committing changes?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎02-05-2016 02:36 PM
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.
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎02-05-2016 03:03 PM
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
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
