I tried this script but could not get this to work?
I found that running the script with the volume set at 58% the line
if [ `aumix -q | grep vol | cut -d' ' -f3` -gt 30 ]; then
cut kept returning ' 58, Integer expected'
changing the line to
if [ `aumix -q | grep vol | cut -d"," -f2` -gt 30 ]; then
worked as expected.
Looks like the " " delimiter in cut was causing ',' to end up in the result.
Anyone else had this happen?