#!/bin/sh echo -n "BAT:" OUT=$(acpi -b | sed -n 's/Battery 0:\(.*\), \(.*\)%\(.*\)/\2/p') if [ $OUT -lt 10 ]; then echo "$OUT%" elif [ $OUT -lt 50 ]; then echo "$OUT%" elif [ $OUT -lt 80 ]; then echo "$OUT%" else echo "$OUT%" fi