Tag:linux_ Awk details

  • Linux awk time calculation script and detailed explanation of awk commands

    Time:2021-10-27

    In Linux, if planning time is a hassle, The awk script is as follows BEGIN {FS=”:”;OFS=”:”} {total_seconds=total_seconds+$3} total_seconds>=60 {total_seconds=total_sconds-60 $2=$2+1 } {total_minutes=total_minutes+$2 $2=$2+1 } {total_minutes=total_minutes+$2} total_minutes>=60{total_minutes=total_minutes-60 $1=$1+1} {total_hours=total_hours+$1} END{print $1,$2,$3} The following is a detailed explanation of the Linux awk commands collected for you brief introduction Awk is a powerful text analysis tool. Compared with […]