How to extract values from a command with multi-line output?
Oliver Grawert
ogra at ubuntu.com
Mon Apr 4 19:22:37 UTC 2022
hi,
Am Montag, dem 04.04.2022 um 20:58 +0200 schrieb Oliver Grawert:
...
> $ LC_ALL=C sudo fdisk -l jammy-desktop-amd64.iso | tail -3 | while
> read
> -r name start end size type; do echo "$name $size $type"; done
> jammy-desktop-amd64.iso1 6688356 3.2G Microsoft basic data
> jammy-desktop-amd64.iso2 8504 4.2M EFI System
> jammy-desktop-amd64.iso3 600 300K Microsoft basic data
> $
...
whoops ... i missed the sectors, that should have been:
$ LC_ALL=C sudo fdisk -l jammy-desktop-amd64.iso | tail -3 | while read
-r name start end sectors size type; do echo "$name $size $type"; done
jammy-desktop-amd64.iso1 3.2G Microsoft basic data
jammy-desktop-amd64.iso2 4.2M EFI System
jammy-desktop-amd64.iso3 300K Microsoft basic data
ciao
oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20220404/242fd1de/attachment.sig>
More information about the ubuntu-users
mailing list