From: Darren Johnson (dazza_johnson@yahoo.co.uk)
Date: Mon Jan 21 2008 - 15:19:17 ARST
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.
-- Gregory Wendel Springfield VA, 22153
This archive was generated by hypermail 2.1.4 : Fri Feb 01 2008 - 10:38:00 ARST