Is there a way to eject all the mounted hard drive volumes on an OS X computer from the command line? Applescript is OK if I can wrap that in a shell script.
I found this to work for ejecting all dmg and physical hard drives:
find /dev -name "disk[1-9]" -exec diskutil eject {} \;