#!/bin/bash ret=$(mount | grep extern) if [ $ret -ne 0 ] then echo "not mounted" else echo "mounted" fi