mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
38a623ef96
Obtained from: ftp://ftp.ee.lbl.gov/traceroute.tar.Z on 30-Sep-1996.
13 lines
221 B
Awk
13 lines
221 B
Awk
/^ *[0-9]/ {
|
|
# print out the average time to each hop along a route.
|
|
tottime = 0; n = 0;
|
|
for (f = 5; f <= NF; ++f) {
|
|
if ($f == "ms") {
|
|
tottime += $(f - 1)
|
|
++n
|
|
}
|
|
}
|
|
if (n > 0)
|
|
print $1, tottime/n, median
|
|
}
|