eject volume

Hi
I know we can eject external drive with simple script like this

tell application "Finder"
	eject disk "SPEC"
end tell

but i want to know if there is any shell script that do similar thing.
i want a script that eject all the external drive.

I am doing this because I am running script from the “simple finder”
thanks