Parse Running Config with TcL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2015 09:52 AM
Hi All,
I've written a script to parse our configs against company policy using TcL. I'm setting a variable as the output of "show run".
set run [exec "show run"]
The problem is sometimes my $run variable isn't the config, but says something like "building the configuration". Is there a way of either making TcL wait for the configuration to be built, or to open it as a variable from flash to parse?
Thanks,
Cory Anderson
- Labels:
-
EEM Scripting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2015 08:56 AM
Honestly, I am pushing people away from using tclsh for anything more than a few lines. Instead, using EEM Tcl provides better access control, better libraries, better debugging, and more reliability.
If you convert your script to EEM Tcl, you will have much better luck getting the full output of CLI commands.
