Skip to content

Instantly share code, notes, and snippets.

@kidd
Created November 11, 2009 23:10
Show Gist options
  • Save kidd/232418 to your computer and use it in GitHub Desktop.
Save kidd/232418 to your computer and use it in GitHub Desktop.
#!/bin/bash
var=0
#amixer get Master | grep Left: | sed 's/^.*\[\(.*\)%\].*/\1/'
echo $var
if (test $var = 0) then
jaj=`amixer get Master | grep Left: | sed 's/^.*\[\(.*\)%\].*/\1/'`
sed -e 's/^var=[[:digit:]]*$/var='$jaj'/' vol >.vol2
amixer set Master 0
else
amixer set Master $var"%+"
sed -e 's/^var=[[:digit:]]*$/var=0/' vol >.vol2
fi
mv -f .vol2 vol
#sed -e 's/echo 0/echo 0/' vol >.vol2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment