#!/bin/bash # Simple ICMP traceroute implemented with the ping command. # (c) November 2007 Thomas Guettler # http://www.thomas-guettler.de/ # This script is in the public domain if [ -z "$1" ]; then echo "Usage: $0 host" exit 1 fi host=$1 ttl=1 while [ $ttl -lt 30 ]; do ping -t $ttl -c 1 $host | grep -Ei '^(From|[0-9]* bytes)' let "ttl=ttl+1" done