Condense awk command

This commit is contained in:
Dylan Araps 2016-06-13 22:33:34 +10:00
parent 758f883eb9
commit 9f28c025bb
1 changed files with 1 additions and 1 deletions

View File

@ -1173,7 +1173,7 @@ getcpu_usage () {
esac
fi
cpu_usage="$(ps aux | awk 'BEGIN { sum = 0 } { sum += $3 }; END { print sum }')"
cpu_usage="$(ps aux | awk 'BEGIN {sum=0} {sum+=$3 }; END {print sum}')"
cpu_usage="$((${cpu_usage/\.*} / ${cores:-1}))"
;;
esac