From: William Caban (william@monids.org)
Date: Mon Jan 21 2008 - 20:11:20 ARST
Keep it simple. Let the fancy scripts for your day-to-day use or your
home lab. Use variables with names that "form" sentences. You will have
enough stress from everything else during the lab. If a
"tool/script/alias/etc" takes more than 2 seconds to recreate, it might
not be such a good idea.
I use this and it just works:
foreach address {
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
} { ping $address source lo0 }
On Mon, 2008-01-21 at 17:19 +0000, Darren Johnson wrote:
> Hey Greg, this is awesome. The beauty is that with SecureCRT you can 'send
> chat' to multiple windows, ie all routers. Therefore, you can paste this
> into the chat window and run it once, and find out what responded on all
> routers without scrolling to check there are ! (ping responses).
> I changed it slightly though (to include success and failed) as follows:
>
> foreach ip {
> 1.1.1.1
> 2.2.2.2
> 3.3.3.3
> } {
> if { [regexp "(!!!)" [exec "ping $ip timeout 1" ]] } {
> puts "$ip **** SUCCESS ****"
> } else { puts "$ip **** FAILED ****" }
> }
> which outputs
>
>
> 1.1.1.1 **** SUCCESS ****
> 2.2.2.2 **** FAILED ****
> 3.3.3.3 **** SUCCESS ****
>
> My only problem, how to remember this for the lab :-(
>
> Dazzler
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of Greg
> Wendel
> Sent: 20 January 2008 18:31
> To: Cisco certification
> Subject: TCL script enhancement.
>
> Richerich at the link below has an interesting new twist to the ubiquitous
> TCP script we all know and love. Check out the link below.
>
> http://www.sadikhov.com/forum/lofiversion/index.php?t108090.html
>
> Here is a quick excerpt.:
>
> foreach ip {
> 1.1.1.1
> 2.2.2.2
> } {
> if { [regexp "(!!!)" [exec "ping $ip timeout 1" ]] } {
> puts "$ip"
> } else { puts "$ip **** failed ***" }
> }
> which outputs
>
>
> 1.1.1.1
> 2.2.2.2
> 3.3.3.3 **** failed ****
>
>
>
> Thank you very much Richerich for this helpful info.
This archive was generated by hypermail 2.1.4 : Fri Feb 01 2008 - 10:38:00 ARST