#!/bin/sh enabled=$(amixer -D pulse sget Master | egrep -o "\[on\]" | wc -l) if [[ $enabled == "0" ]]; then echo "off" else echo $(amixer -D pulse sget Master | egrep -o "[0-9]+%" | head -n 1) fi exit 0