Condense awk command
This commit is contained in:
parent
758f883eb9
commit
9f28c025bb
2
neofetch
2
neofetch
|
@ -1173,7 +1173,7 @@ getcpu_usage () {
|
||||||
esac
|
esac
|
||||||
fi
|
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}))"
|
cpu_usage="$((${cpu_usage/\.*} / ${cores:-1}))"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Reference in New Issue