Re: [Solved] Difficulty with a shell function.
From: Greg Wooledge <greg@wooledge.org>
Date: Sun, 25 Jan 2026 15:26:19 -0500
> What?
My knowledge of ISO 9660 is cursory but note the first sentence
in https://en.wikipedia.org/wiki/Optical_disk_image ,
"... disk image ... written to an optical disk, disk sector by disc sector ...".
Not directly comparable to ext4.
> > 2026-01-19-03-28-45-00. Shorter than a UUID for a file system.
>
> This looks like a timestamp.
Explained by Thomas Schmitt in <[🔎] 16912500410373272277@scdbackup.webframe.org>
>> lsblk --nodeps -o name,serial | grep -F -- "$destination" | cut -d ' ' -f1
> So... you *have* the serial number (somehow) ...
As you did.
# lsblk --nodeps -o name,serial
> The obvious way would be to use awk: ...
OK, thanks. cut, awk and others. cut seemed straightforward.
> awk -v isn't 100% safe with all inputs, but if your serial number is
> reasonable (alphanumeric, maybe with some basic punctuation, but no
> backslashes or control characters) it should be OK.
The cut I used relied only on blank separation.
Thanks, ... P.
--
mobile: +1 778 951 5147
VoIP: +1 778 508 0020
Bcc: peter at e a s t h o p e dot c a
projects: en.wikibooks.org/wiki/User:PeterEasthope
Reply to: