ping some_host | while read LINE; do echo $(date): $LINE; done
October 10, 2011 — janos
The while loop reads the output of ping line by line, and echoes it back with $(date) prepended.
while
ping
$(date)