If your laptop is running unplugged and you need to conserve battery life, one way of saving power is to turn off AirPort. (You may also run into situations where you'd want to turn AirPort on or off as part of a longer script, such as to keep it from dying completely when putting a MacBook to sleep while Internet Sharing is enabled.) Although there seems to be no reliable way of turning AirPort on or off directly via the shell, it is possible to get around that by manipulating OS X's Locations with the scselect command.
First, create a new location called AirPort-Off in the Network preferences pane. With this new location selected, select Network Port Configurations under the Show pop-up menu, and deselect AirPort. Then select your previous location, which for most people would probably be Automatic.
Now, you can turn AirPort off by running scselect AirPort-Off and back on by running the last command, replacing AirPort-Off with the name of your normal location name. To assign a hot key to the command using a utility like Butler, create a simple AppleScript containing this one line:
do shell script "/usr/sbin/scselect AirPort-Off"
Then have Butler (or your app of choice) run that APpleScript. (With Butler, running a shell script containing only the bare command doesn't seem to work.)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20070728102702656