ColbyG wrote: » I use Excel religiously. It's the best tool ever for generating configs.
Forsaken_GA wrote: » I suppose it depends on your source material. Excel can be useful, but I can do it faster with bash/awk/sed/grep to actually generate the script, then I can feed that to an expect script to actually login and apply it hehe.
ColbyG wrote: » This is interesting. I'm weak at everything scripting, sadly. What do you use as your source for bash/awk/etc scripts.
In a recent case, for instance, I did a migration from an old DC access setup to a new one. I had the customer put all of their servers on a sheet with name and VLAN info (among other irrelevant information). With some predefined command syntax and concatenate in the top cell, all I had to do was drag from top to bottom and I had ~300 ports configured. Could I be doing this better? I feel like I'll end up with the spreadsheet either way as it is useful for more than simply generating config, but if there's a better/more flexible way to do these things, I'd love to know.
ColbyG wrote: » Can you post some of your scripts/tools? I'd love to add them to the arsenal. And, hopefully one day, I can even build on them.
#!/usr/bin/expect -f set timeout -1 #exp_internal 1 set address [lrange $argv 0 0] set commands [lrange $argv 1 1] set fp [open "$commands" r] set data [read $fp] log_file -noappend ./$address.log spawn /usr/bin/telnet $address expect "Username:" "send <USERNAME SANITIZED>\r" expect "Enter PASSCODE:" send "<PASSCODE SANITIZED>\r" expect -re "#" { send "$data"; } interact close $fp
7of9 wrote: » Wow...this really is some ninja-level stuff! A related question...rather than giving us the script sources...can you point out some good resources for LEARNING script skills like these? I've tried a few times to learn scripting and have never quite gotten the hang of it, but I think now might be a good time to try again, particularly hearing about the level of automation you've been able to achieve. Books, websites...anything you've got that you've found helpful?
7of9 wrote: » One other question - Do you use Confluence at work, for the group you work with, or do you use it for your own personal wiki/knowledgebase? Either way, why did you pick it above other choices? Thanks!
Forsaken_GA wrote: » The best way to learn scripting is to have a need for something, and then try to build it. Just trying to acquire scripting as a skill without any need in mind for it is just going to bore you, it's alot easier to retain it and stick with it when you're working towards a goal. My early scripting attempts were ugly and nasty, and I've refined my skills over the years, but while my early code may have been ugly as sin... it worked..
Dang... I forgot about Google/Internet and even Youtube.com.
networker050184 wrote: » Cygwin if you are working primarily from a Windows machine is a must have for me.