Posts

Showing posts with the label strftime

[awk] timestamp on 1st column

|awk ' { print strftime("[%Y-%m-%d %H:%M:%S]", systime()),$0 } ' --------------- output example # echo aaaa |awk ' { print strftime("[%Y-%m-%d %H:%M:%S]", systime()),$0 } ' [2016-01-29 20:24:53] aaaa