#!/bin/bash #COUNT=0 #ARRAY=() if [ -n "$(ls -A /mnt/nfs/Downloads)" ]; then DOWNLOADS="Downloads" echo "Unmounting $DOWNLOADS" if sudo umount /mnt/nfs/$DOWNLOADS ; then echo "Unmounted $DOWNLOADS" fi fi if [ -n "$(ls -A /mnt/nfs/Music)" ]; then MUSIC="Music" echo "Unmounting $MUSIC" if sudo umount /mnt/nfs/$MUSIC ; then echo "Unmounted $MUSIC" fi fi if [ -n "$(ls -A /mnt/nfs/Video)" ]; then VIDEO="Video" echo "Unmounting $VIDEO" if sudo umount /mnt/nfs/$VIDEO ; then echo "Unmounted $VIDEO" fi fi