#!/bin/sh # this is a dirty hack. # acpi | awk '{print $4}' will print the battery percentage, # and s/,$// strips the trailing comma. acpi | awk '{print $4}' | sed 's/,$//'