Add the next function and its corresponding alias to a shell startup script to set sound volume from the command-line. Thanks to Nick Robinson-Wall for sharing how to set/get/mute volume from the command line with #macos.