After chatting with [ my buddy Dave ](http://mortysworld.blogspot.com)
about how awesome it is to show off using terminal to !1337 computer
users I realized how often I’m sitting at command-line listening to music
in iTunes and wondered how to control iTunes with a shell script.
I searched around an found [ this ](http://www.macosxhints.com/article.php?story=20011108211802830)
article on the topic but of course wanted many tweaks of my own so I’ve
wrote the following script that should allow anyone to control iTunes in terminal
or via SSH remotely.
### Possible Uses ###
The implications are pretty neat if you think about it.
DJ a party from a laptop, iPhone, or mobile with SSH
Control your home or office music server remotely
Scare the heck out of your roommates
### The Code ###
#!/bin/sh
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# edited by Jon Todd 2007.11.20
####################################
showHelp () {
echo "-----------------------------";
echo "iTunes Command Line Interface";
echo "-----------------------------";
echo "Usage: `basename $0`
### Installation ###
Write this code to a file called “itunes” and put it in your bin directory
Nice Post! you can also SCP this file from remote to local, then SSH and have control. That way you can control not just your box, but any box that would have ITunes that your friends’ can share at a party.
Nice Post! you can also SCP this file from remote to local, then SSH and have control. That way you can control not just your box, but any box that would have ITunes that your friends’ can share at a party.