06-02-2011 07:19 AM
I need to log into about 60 routers, run the same show commands on each router, and copy each router's outputs as a file on my workstation. Can someone provide a sample TCP script to do those things? I'm not good at programming.
Greatly appreciated.
07-22-2011 08:32 PM
Rut ro
I AM using AAA.
I'm assuming I should change this:
expect -re ".*assword:" {
exp_send "$pass\r"
}
to this:
expect -re ".*sername:" {
exp_send "$user\r"
}expect -re ".*assword:" {
exp_send "$pass\r"
}
How far off am I?
PS - TY for your help! The engineers at work tell me I don't need to know Tcl [except to take the CCIE lab (bwhahahaha!)] but I've never learned scripting/programming/coding at all... and it's always intrigued me...
I always said I'd marry a man JUST because he knows how to write scripts
~Kathy
07-23-2011 01:46 PM
Assuming you have a $user variable with the correct username, then yes your proposal should work. That said, things will fail when you move to enable mode unless you set your $prompt variable to:
"\[>#]"
That is:
set prompt "\[>#]"
07-23-2011 02:06 PM
Enable mode?
Uhhhh.....que?
Kidding.
No, I'm the intern.
I have level 1 "n00b" access.
I had level 15 access the second day, for a special project. (I wrote a VACL! Wooot!)
It scared the CRAP out of me.
I did a show mac-address yada yada and it just kept going and going and going...
All those poor employees!
...they had *NO IDEA* how close they were to having their desktops instanteously combust
And Cisco is going to be supplying POWER to the cube, now?
With people like *ME* responsible for getting it there?
Bwahahahahahahahahahahahaha!!!!
TY for the heads up.
I'm gonna try it tomorrow...
(crosses fingers...)
~Kathy
06-14-2011 06:07 PM
Scott....
Being a temporary intern, I have been busy doing this n' that....
...but I've been looking forward to playing around with Tcl...
That is....
....until....
...I opened your cmd-win32.tcl.zip...
I read it.
I read it again.
I'm not sure, but I think I need medical attention.
I mean...that literally HURT my brain...
I never learned any programming languages...
The last time I tinkered with anything was (wait for it...) about 5 or 10 lines of BASIC (which was stored on a cassette tape hooked to a Trash-80...)
I CAN do HTML and played with CSS, which Tcl kinda reminds me of, but man oh man.... am I gonna need a stiff bottle of scotch and a computer I don't mind mistakenly formatting c:\ after 1 shot of scotch (I'm small...)
(I did "copy bs: flash:" very late one night [at 1:30am]... ask me how THAT went...)
Anyhoo...I'm gonna modify your script as per Gary's questions (b/c I literally am running the same environment, 'cept his DIR path ain't the same ) and see how it goes...
If I need you to help me XMODEM, we know things didn't go so goog....
~Spamster
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide