1 2 3 4
#!/bin/sh echo "$(acpi | cut -d ' ' -f 4 | sed 's|[%,]||g' | awk '{ total += $1; count++ } END { print total/count }')%"