#!/bin/sh # this is a dirty hack. # acpi | awk '{print $4}' will print the battery percentage, stripping the # trailing comma acpi | awk '{sub(",$", "", $4); print $4}'