Accumulate? Untested concept:
$ perl -MDP -e'while(<>){/^(.*)\s+capacity:\s*((\d+).*)/||next;$i{$1}[ +0]+=$2;$i{$1}[1]//=$3}print"$_: $i{$_}[0], "for keys%i;printf"%5.1f%% +\n",100*$i{remaining}[1]/$i{design}[1]' /proc/acpi/battery/*/*
In reply to Re^4: Laptop Battery Percentage
by Tux
in thread Laptop Battery Percentage
by naildownx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |