#!/bin/bash #Mount & umount usb devices echo 'Select device to mount (full path):' echo '/dev/sdx <--- Incorrect' echo '/dev/sdx1 <--- Correct' ls -l /dev/sd* | grep storage read device echo Select the mount point: echo 1. /mnt/celular echo 2. /mnt/ipód echo 3. /mnt/pendrive echo 4. /mnt/usb4 read point while [ "$point" != "1" ] && [ "$point" != "2" ] && [ "$point" != "3" ] && [ "$point" != "4" ]; do echo invalid option echo Select a valid mount point read point done case $point in 1) sudo mount -t vfat $device /mnt/celular && echo $device mounted to /mnt/celular && echo --- Press a key to umount --- && read && sudo umount /mnt/celular && echo /mnt/celular umounted && read;; 2) sudo mount -t vfat $device /mnt/ipod && echo $device mounted to /mnt/ipod && echo --- Press a key to umount --- && read && sudo umount /mnt/ipod && echo /mnt/ipod umounted && read;; 3) sudo mount -t vfat $device /mnt/pendrive && echo $device mounted to /mnt/pendrive && echo --- Press a key to umount --- && read && sudo umount /mnt/pendrive && echo /mnt/pendrive umounted && read;; 4) sudo mount -t vfat $device /mnt/usb4 && echo $device mounted to /mnt/usb4 && echo --- Press a key to umount --- && read && sudo umount /mnt/usb4 && echo /mnt/usb4 umounted && read;; esac