Skip to main content

It depends on your awk version (you probably have to use gawk instead of awk) or directly run date in your awk commandline, but

awk 'NR%13==0 { printf  "%d %s\n",  systime(), $0 ; fflush(stdout) }'

will print the current timestamp in front of the current line. For more information have a look at the gawk documentation about time functions.

Ulrich Dangel
  • 25.7k
  • 3
  • 85
  • 81