#!/bin/bash # Mountpoint for volumes MOUNTPOINT="$HOME/unidades" for f in $(ls -1 $MOUNTPOINT) ; do umount $MOUNTPOINT/$f || true done exit 0