#! /usr/bin/env bash if grep $1 /etc/mtab > /dev/null then umount $1 exit 0 fi echo FAILED TO UNMOUNT $1 exit 1