Skip to content

Instantly share code, notes, and snippets.

@someara
Created July 20, 2012 01:56
Show Gist options
  • Save someara/3148184 to your computer and use it in GitHub Desktop.
Save someara/3148184 to your computer and use it in GitHub Desktop.
check_if_mounted
function check_if_mounted() {
local mount_point="$1"
local device="$2"
mount | grep "^`printf "$mount_point"`" | awk '{ print $3 }' | grep "`printf "$device"`" 2>&1>/dev/null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment