Plan: I want to unmount an iscsi volume on my OS X Desktop in a script only if it's mounted. So far, I've identified the disk as
diskutil list | grep 'V-Movies' | rev | cut -c1-7 | rev...
Continuing the line in order to unmount:
diskutil list | grep 'V-Movies' | rev | cut -c1-7 | rev | diskutil unmount [disk4s2]
but how do I refer to the disk in square brakets? I realize this may not be the most efficent solution. Any help would be appreciated.