#!/usr/bin/env sh # Quick hack to display battery levels for the laptop str="s/ Charging, /C/;s/ Discharging, /D/;s/ Unknown,/U/" acpi | cut -d: -f 2- | sed "$str" | cut -d\ -f 1-2 | cut -d: -f 1-2;