Is device mounted? Both UUID and device names accepted
Nice work.  I approve of set -eu, and the script pleases Shellcheck.

Here's the things I'd consider changing.



I think error messages should go to the error stream.  Example:

[ "${#}" -ne 1 ] &amp;&amp; { echo "Invalid number of arguments." &gt;&amp;2; exit 1; }
#                                                         ^^^ here




Instead of using the negation operator, I'd replace the form ! test &amp;&amp; error with plain test || error like this:

is_block_device "${device_string}" || { echo "The given argument is not a block device." &gt;&amp;2; exit 1; }




The script doesn't work when I use other links to block devices, such as those in /dev/disk/by-label.  I'd fix that by abandoning the /by-uuid/ test, and instead following symlinks until a real file or dangling link is found:

resolve_symlink() {
    f="$1"
    while [ -h "$f" ]
    do f=$(readlink -f -n "$f")
    done
    printf '%s' "$f"
}




is_empty_string "${device_string}" &amp;&amp; { echo "The given argument is not a device path." &gt;&amp;2; exit 1; }
is_block_device "${device_string}" || { echo "The given argument is not a block device." &gt;&amp;2; exit 1; }

readonly device_name=$(resolve_symlink "$device_string")

if is_device_mounted "$device_name"
then




Why does is_device_mounted ignore its argument and use $device_name instead?



Minor issue: we assume that the block device name contains no regex metacharacters here:

grep "^${device_name} "


That's probably a fair assumption on a non-weird Linux system; I normally use Awk for robust versions such tests ($1 = $device_name, with a suitable -v option) but I don't know how well that meets your portability goals.

If using grep (without the non-standard -q option), then it's usual to discard the output, and use grep's exit status directly, rather than capturing the output and testing it's non-empty.



Minor/style: I'm not a big fan of using braces for every variable expansion.  I prefer to reserve them for when they are really needed, and that seems to be the usual idiom.