Timestamp ping output (awk)
ping google.com | awk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }
Prepends a timestamp to each line of ping output using awk's strftime function.
ping google.com | awk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }
Prepends a timestamp to each line of ping output using awk's strftime function.