Posted on 2006-11-07
I am using traceroute to count hops between servers which it does just fine, what i am looking to do is write a script to output the last line/hop of the traceroute output to an excel file, is ther an easy way to do this?
Tracing route to AT1006.corpnet1.com
over a maximum of 30 hops:[xxx.xxx.xxx.xxx]
1 <1 ms <1 ms <1 ms xxx.xxx.xxx.xxx
2 <1 ms <1 ms <1 ms xxx.xxx.xxx.xxx
3 <1 ms <1 ms <1 ms xxx.xxx.xxx.xxx
4 1 ms 1 ms <1 ms xxx.xxx.xxx.xxx
5 <1 ms <1 ms <1 ms servername [xxx.xxx.xxx.xxx]
6 38 ms 41 ms 39 ms servername [xxx.xxx.xxx.xxx] e.g. this is the only line that i want to export to excel.
There are 40 servers and i can traceroute them all in a batch file but all i need is the last line exported.
Thanks and regards.