Replace commas with dots in uptime output to avoid ending up with truncated floats

This commit is contained in:
Philipp Schmitt 2020-07-28 19:06:35 +02:00
parent 29738fe778
commit b8ac9cac6b
No known key found for this signature in database
GPG key ID: DC439C47EACB17F9

View file

@ -28,6 +28,9 @@ print_load() {
sub(/,$/, "", $(NF-2));
sub(/,$/, "", $(NF-1));
sub(/,$/, "", $NF);
sub(/,/, ".", $(NF-2));
sub(/,/, ".", $(NF-1));
sub(/,/, ".", $(NF));
printf "%.2f %.2f %.2f", $(NF-2)/num_cores, $(NF-1)/num_cores, $NF/num_cores
}')