Skip to content

Instantly share code, notes, and snippets.

@doersino
Created September 19, 2015 09:38
Show Gist options
  • Save doersino/55af01ec4223a10c4ee8 to your computer and use it in GitHub Desktop.
Save doersino/55af01ec4223a10c4ee8 to your computer and use it in GitHub Desktop.
Sets the volume on a Mac.
function setvolume() {
local USAGE
USAGE="usage: setvolume NUMBER_FROM_0_AND_7"
if [ -z "$1" ]; then
echo -e "$USAGE"; return 1
fi
osascript -e "set volume $1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment