#!/bin/sh
STATUS=$(amixer get Master | tail -n1 | sed -r "s/.*\[(.*)\]/\1/")
usage()
{
  echo "mute or unmute sound"
}
if [ $# == 0 ]; then
    if [ ${STATUS} == "on" ]; then
        amixer set Master mute 2>/dev/null
        amixer set Headphone mute 2>/dev/null
    else
        amixer set Master unmute 2>/dev/null
        amixer set Headphone unmute 2>/dev/null
    fi
else
    usage
fi