Any body here use script?
I would like to know if anybody use script on a daily basics. I would like to know the language and if possible a sample of a simple scripts.
Comments
-
stuh84 Member Posts: 503There is more to it than just "script", script isn't a language, its an approach. You could be using anything from Bash scripting, to Perl or Python, Tcl etc.
Scripting is for automating tasks, you'd need to pick a language to get start with to start using them.Work In Progress: CCIE R&S Written
CCIE Progress - Hours reading - 15, hours labbing - 1 -
networker050184 Mod Posts: 11,962 ModIf you are going to be working with large scale networks you have to use scripts. Its just way too much to do manually. We have a guy that writes all of our Perl scripts and he is awesome. I REALLY need to learn how to do it myself though. If he quits we are screwed in the script department.
I make simple bash scripts myself to verify output after maintenance. Nothing major though. Some for loops to parse output for pre/post maintenance diffs.An expert is a man who has made all the mistakes which can be made. -
chmorin Member Posts: 1,446 ■■■■■□□□□□Script. Well scripting is kind of a verb really. You script, but you script in a language of some kind.
As far as basic cisco stuff goes, I suggest learning TCL scripting. Cisco has white pages for it and it can be done in the router/switch.Currently PursuingWGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)mikej412 wrote:Cisco Networking isn't just a job, it's a Lifestyle. -
tndfr Member Posts: 110doesnt matter what scripting language you use, they are all capable in one way or another, learn the concepts of scripting first, start with batch files, then move to PHP, leave Perl last because it is just gonna confuse you if you have never scripted before (and you will give up before you know it)
the one powerfull concept you have to learning is the looping process, once you get your head around that you should be fine.
here is a sample that allow you to simulate the "range" command on older IOS, it put all ports on VLAN20
string foo;
for(int i=1;i<=24;i++)
{
foo+="int fa0/i\nswitchport access vlan 20\n";
}
print(foo);Working on CCNP 642-813 and finishing off MCSA. -
mikej412 Member Posts: 10,086 ■■■■■■■■■■You can do TCL scripts on your routers: Cisco IOS Scripting with Tcl - Cisco Systems
I just use UNIX Shell Scripts in my home lab to load and save the router/switch configurations.:mike: Cisco Certifications -- Collect the Entire Set! -
chmorin Member Posts: 1,446 ■■■■■□□□□□You can do TCL scripts on your routers: Cisco IOS Scripting with Tcl - Cisco Systems
I just use UNIX Shell Scripts in my home lab to load and save the router/switch configurations.
You could also use cat-tools for basic command propagation to devices. Its free for under 20 devices.Currently PursuingWGU (BS in IT Network Administration) - 52%| CCIE:Voice Written - 0% (0/200 Hours)mikej412 wrote:Cisco Networking isn't just a job, it's a Lifestyle. -
mikej412 Member Posts: 10,086 ■■■■■■■■■■Ah -- I knew I had posted a link to this "Cisco Script Site" before....
http://www.techexams.net/forums/ccna-ccent/48657-do-while-cli.html#post361989:mike: Cisco Certifications -- Collect the Entire Set!