Open GoogleCodeExporter opened 9 years ago
Maybe something like this ;)
--- summary 2011-02-06 15:16:11.000000000 +0100
+++ summary.patched 2011-02-09 16:46:26.632329865 +0100
@@ -460,11 +460,17 @@
status="$(awk -F: '/Controller Status/{print $2}' /tmp/aspersa)"
name_val Specs "${model/ /},${chan},${cache} cache,${status}"
+ if grep -q "ZMM" /tmp/aspersa; then
+ battery=$(grep -A2 'Controller ZMM Information' /tmp/aspersa \
+ | awk '/Status/ {s=$4}
+ END {printf("ZMM %s", s)}')
+ else
battery=$(grep -A5 'Controller Battery Info' /tmp/aspersa \
| awk '/Capacity remaining/ {c=$4}
/Status/ {s=$3}
/Time remaining/ {t=sprintf("%dd%dh%dm", $7, $9, $11)}
END {printf("%d%%, %s remaining, %s", c, t, s)}')
+ fi
name_val Battery "${battery}"
# ###########################################################################
Original comment by jan.m...@googlemail.com
on 9 Feb 2011 at 3:47
Original issue reported on code.google.com by
jan.m...@googlemail.com
on 7 Feb 2011 at 10:14Attachments: