Changing Volume in OS X in the Command Line

One of the things that seems to have disappeared recently (certainly doesn’t work in Lion) is half-increment volume changing. This is quite inconvenient when I’m using some more sensitive headphones.

That was the impetus for the latest addition to my bashrc, a helper function that lets you set volume in the command line (scale is 0-100):

vol () { osascript -e "set volume output volume $*"; }