1 2 3 4 5 6 7 8 9 10 11
#!/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 echo "TODO BSD battery" exit 1 fi