Changes between Version 3 and Version 4 of rrdtool
- Timestamp:
- 02/01/22 02:07:57 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
rrdtool
v3 v4 13 13 Wed 18 Aug 2021 10:00:00 PM +07 14 14 }}} 15 16 Convert date from epoch time to human readable format 17 {{{ 18 #!sh 19 OMD[monitor@501264b41d2d]:~/var/log$ awk -F"[][]" '{cmd="date -d@" $2;cmd |getline $2; close(cmd)}1' naemon.log 20 }}} 21 Here we set a shell command date -d@$2 to a variable called cmd. Then with cmd |getline $2 the awk reads a line and pass second field value to the cmd we open it, then we need close the command we opened via pipe, so we used close(cmd)