title: How to check if filepath is mounted in OS X using bash?
body: <p>How do I perform the mount only if it has not already been mounted?</p>
  
  <p>This is on OS X 10.9 and this is what I have currently:</p>
  
  <pre><code>#!/bin/bash
  
  # Local mount point
  LOCALMOUNTPOINT="/folder/share"
  
  # Perform the mount if it does not already exist
  if ...
  then
  /sbin/mount -t smbfs //user:password@serveraddress/share $LOCALMOUNTPOINT
  
  else
      echo "Already mounted"
  fi
  </code></pre>