ejectall (330B)
1 #!/bin/sh 2 for f in "/Volumes/"*; do 3 if [ "$f" != "/Volumes/Macintosh HD" ]; then 4 if [ "$f" != "/Volumes/MobileBackups" ]; then 5 diskutil eject "$f" 2>&1 | \ 6 sed "s/Volume failed to eject/$(tput setaf 1)Volume failed to eject$(tput sgr0)/" | 7 sed "s/Unable to find disk for .*com\.apple\.TimeMachine.*//" 8 fi 9 fi 10 done