Skip to content

Commit

Permalink
Create mounter.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
juanfernandovillahernandez authored Feb 21, 2017
1 parent 67f2735 commit f54dc0e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mounter.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /bin/bash #script ismounted #determina si un dispositivo está montado
# o si en un directorio se ha montado un dispositivo
#uso: ismounted "directorio" o ismounted "device"
# device puede ser /dev/sda4
mounter=$(grep "$1" /proc/mounts)
if [ -z "$mounter" ];
then echo "$1 NO montado"
else echo "$1 Montado"
fi

0 comments on commit f54dc0e

Please sign in to comment.