Controlling sound output device with terminal
Does anyone know if there is a command for this? I know you can control various plist settings via terminal, but haven't found a way to change sound output device. I manage a lab, and I'd like to be able to send a command to all the computers via remote desktop to change to headphones. It's managed through user profiles, so I can't just set it once and forget about it.
I found that the "say" command has a flag -o, which stands for out, but I don't know if that means output or something else.
$ say -o
say: option requires an argument -- o
Usage: say [-v voice] [-o out] [-f in | message]
Mac OS X (10.6.8)