Hi,
this is a quite trivial question: in a lot of scripts I test if some removable media is mounted at a specific point in the filesystem. I do this with something like the following:
and test how many lines I got back. Something smaller is
and test the return value of grep. If I want to test that a device is mounted exactly in a mount point I do something like:
Is there a smarter way or some utility command to test if a filesystem is mounted in a specific position?
this is a quite trivial question: in a lot of scripts I test if some removable media is mounted at a specific point in the filesystem. I do this with something like the following:
Code:
mount | grep $MOUNT_POINT | wc -l
and test how many lines I got back. Something smaller is
Code:
mount | grep $MOUNT_POINT
and test the return value of grep. If I want to test that a device is mounted exactly in a mount point I do something like:
Code:
mount | grep $MOUNT_POINT | grep $DEVICE
Is there a smarter way or some utility command to test if a filesystem is mounted in a specific position?