:: Re: [DNG] findUUID?
Top Page
Delete this message
Reply to this message
Author: Pontus Goffe
Date:  
To: dng
Subject: Re: [DNG] findUUID?

At 2025-12-20 16:31 Peter wrote:
> if [ findmnt -nrS UUID=$workingVolume ]; then
>    echo "$workingVolume is not mounted"
> else
>    echo "$workingVolume is mounted"
> fi

>
> The if condition has a syntax error. Can someone suggest a fix?
>

STDOUTANDERR=$(findmnt -nrS UUID=$workingVolume 2>&1)

EXITVALUE=$?

if [ ${EXITVALUE} -ne 0 ]; then

echo "$workingVolume is not mounted"

fi

//PG