Categories Coding Using Awk To Prefix Lines With Millisecond Timestamp Post author By Rory Winston Post date July 2, 2009 Here is a handy way to get awk to preprocess a line and add a timestamp (Put here as I will probably forget how to do this straight away again!) echo "foo,bar" | awk '{x="'"`date +%Y%M%d%S%N`"'"; printf "%s,%s\n",x,$0 }' ← London UseR Group Talk – Slides → Compiling The kdb/R interface on Win32