diff options
author | Patrick Simianer <p@simianer.de> | 2015-04-26 12:55:25 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-04-26 12:55:25 +0200 |
commit | dcecdf63051a981f582d326d8a1b72bfd9c6b9eb (patch) | |
tree | 286b0d9056eb1412e429b654eea358d7c7283e18 /avg_batt | |
parent | 7047583d560c5ac2da71b0637ea7b98c187c33b2 (diff) |
avg_batt: finally, awk works
Diffstat (limited to 'avg_batt')
-rwxr-xr-x | avg_batt | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 }')%" |