Code Sample |
if [ ! -f "$MOUNTPOINT/$TARGETFILE" ]; then if [ $MOUNTED == "no" ]; then sudo umount $MOUNTPOINT fi fi |
Code Sample |
MOUNTPOINT="$(grep "^/dev/$DEVICE" /etc/mtab|awk '{print $2}'| head -n 1)" |
Code Sample |
MOUNTPOINT="$(awk '{$1 == "^/dev/$ENVIRON["DEVICE"]"} END {if (++cnt==1){print $2}} ' /etc/mtab)" |
Code Sample |
if [ $MOUNTED == "no" ]; then |
Code Sample |
if [ "$MOUNTED" = no ]; then |
Code Sample |
mount: /dev/hdb11 already mounted or /mnt/hdb11 busy mount: according to mtab, /dev/hdb11 is already mounted on /mnt/hdb11 |