Cisco Tcl Script Pdf
It would take way too long to explain Tcl. So I will point you to the Tcl language reference:. While IOS uses Tcl 8.3, the documentation on 8. Velleman Pc Lab Download there. 4, and the tutorial on 8.5 will be helpful. As for the IOS/EEM nature of the policy, I will go through that briefly. First, you should familiarize yourself with EEM scripting in Tcl on IOS. The first line registers a new CLI policy with the EEM policy director.
This policy will run when someone runs the 'show running-config' command (or any abbreviation thereof). The policy will run synchronously, blocking until complete. The script will run for no longer than five minutes. The next non-comment lines load the two required EEM namespaces. Romaniello Superhero Workout Pdf.
Cisco tcl script pdf This book shows how to use the Tcl scripting language to do just that. PDF The popular standard, used most often with the free Adobe.
These are documented in the link above. They provide necessary EEM functions as well as some nice convenience procedures. The following run_cli procedure is something I wrote to make running CLI commands easier with EEM. It uses the cli interface documented at the EEM link above to open a cli session, enter enable mode, and then run a specified list of CLI commands, returning the output to the caller.
Finally, we get into the main portion of the script. The first main line runs the 'show run' command, and saves the result in the $output variable. Then, the script iterates through each line in the show run output, and checks the line to see if matches the regular expression '(password key community)'. Winarchiver Virtual Drive there. This means, if the line contains the word 'password', 'key', or 'community' it will match the regular expression.