#!/bin/sh #print battery info in a short way if uname -o | grep -qi "linux" then acpi -b | cut -d"," -f 1-2 | cut -d" " -f 3- else if uname -o | grep -qi "netbsd" then envstat -d acpibat0 | grep charge: | cut -w -f 3-3 else echo "TODO $(uname -o) battery" exit 1 fi fi