[email protected] writes:

> # blkid --uuid 2026-01-19-03-28-45-00
> /dev/sdc
Is this a real uuid or redacted one? Its syntax is strange for me.

> Meaning that the block device with that UUID is connected to the system.
>
> When this executes,
>
>     destination="2026-01-19-03-28-45-00";
>     printf "destination=$destination\n";
>     if ! ( lsblk -alno UUID | grep $destination > /dev/null ); then
>       printf "destination device not connected.  Aborting.\n"
>     else
>       printf "destination device is connected.\n"
>       dev="$( blkid --uuid $destination )";
>       printf "dev=$dev\n";
>       # FTH;
>     fi;
>     
> this is the output.
> destination=2026-01-19-03-28-45-00
> destination device not connected.  Aborting.
>
> With the device being present, I expect this.
> destination=2026-01-19-03-28-45-00
> destination device is connected.
> dev=/dev/sdc
>
> Does this line have a syntax error?
>     if ! ( lsblk -alno UUID | grep $destination > /dev/null ); then
>
> Thanks,                  ... P.

what returns:
destination="2026-01-19-03-28-45-00";
lsblk -alno UUID | grep $destination
?
KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/
EMACS = Each Manual's Audience is Completely Stupified

Reply via email to