summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xavg_batt2
1 files changed, 1 insertions, 1 deletions
diff --git a/avg_batt b/avg_batt
index e7afeee..9fd528f 100755
--- a/avg_batt
+++ b/avg_batt
@@ -1,4 +1,4 @@
#!/bin/sh
-echo "$(acpi | cut -d' ' -f4|sed 's|%||'|avg|round 0)%"
+echo "$(acpi | cut -d ' ' -f 4 | sed 's|[%,]||g' | awk '{ total += $1; count++ } END { print total/count }')%"