If $dir is a mount point this if statement will determine is (Not tested) if [ `stat -fc%t:%T “$dir”` != `stat -fc%t:%T “$dir/..”` ]; then echo “$dir is mounted” else echo “$dir is not mounted” fi
If $dir is a mount point this if statement will determine is (Not tested) if [ `stat -fc%t:%T “$dir”` != `stat -fc%t:%T “$dir/..”` ]; then echo “$dir is mounted” else echo “$dir is not mounted” fi