Convert timestamp column in logs from unix time to date-time

 

Convert timestamp column in logs from unix time to date-time:



cat logfile.log |  awk -F ] '{"cat /proc/uptime | cut -d \" \" -f 1" | getline st;a=substr( $1,2, length($1) - 1);print strftime("%F %H:%M:%S %Z",systime()-st+a)" -> "$0}'


Comentarii

Postări populare de pe acest blog

Process Command Line Arguments in Python

SQL injection with UNION

Docker compose DNS resolution