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 documentationgawk documentation about time functions.

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.

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.

Source Link
Ulrich Dangel
  • 25.7k
  • 3
  • 85
  • 81

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.