0

Add timestamp to the output of ping

ping some_host | while read LINE; do echo $(date): $LINE; done

October 10, 2011janos

Explanation

The while loop reads the output of ping line by line, and echoes it back with $(date) prepended.