[status] fix: space in sb-cpu

This commit is contained in:
David JULIEN 2022-11-18 12:14:53 +01:00
parent 1d9fc97dcf
commit fff6cc7ca8
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ cache=/tmp/cpubarscache
stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat)
[ ! -f $cache ] && echo "$stats" > "$cache"
old=$(cat "$cache")
printf " %s " " "
printf " %s " ""
echo "$stats" | while read -r row; do
id=${row%% *}
rest=${row#* }