01-19-2016 10:48 AM
I found a simple script to ping a list of IPs, but how do I output the results to a file in flash?
This is what I have so far:
foreach address {
10.226.126.30
224.0.0.5} { ping $address repeat 5 source g1/0/0
}
Thanks.
Solved! Go to Solution.
01-19-2016 04:39 PM
set fd [open "flash:ping.txt" w]
foreach address {10.226.126.30 224.0.0.5} {
set output [exec "ping $address repeat 5 source g1/0/0"]
puts $fd $output
}
close $fd
01-19-2016 04:39 PM
set fd [open "flash:ping.txt" w]
foreach address {10.226.126.30 224.0.0.5} {
set output [exec "ping $address repeat 5 source g1/0/0"]
puts $fd $output
}
close $fd
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