Suppose do you want test if /mnt/disk is a mount point in a shell script. How do you do this?
df $path_in_question | grep " $path_in_question$"
This will set $? upon completion.
$?