4 lines
132 B
Bash
4 lines
132 B
Bash
|
count=$(acpi -b | wc -l)
|
||
|
sum=$(acpi -b | grep -Eo '[0-9]{1,3}%' | tr -d '%' | xargs | sed -e 's/ /+/g' | bc)
|
||
|
echo $((sum / count))%
|