Simple BASH script to eject all mounted DMGs. Works with Terminal Notifier
Just run ./ejectAllDMG.sh to run. Can be symlinked to a folder in your path to work from any folder. Something like this should work:
ln -s ~/ejectAllDMG.sh /usr/local/bin/ejectDMG