:: Re: [DNG] findUUID?
Top Pagina
Delete this message
Reply to this message
Auteur: Pontus Goffe
Datum:  
Aan: dng
Onderwerp: 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