From: Karel Zak <kzak@redhat.com>
To: Ron <ron@debian.org>
Cc: Andreas Henriksson <andreas@fatal.se>,
785116@bugs.debian.org, util-linux@vger.kernel.org
Subject: Re: Bug#785116: util-linux: blkid -s returns too much information
Date: Thu, 14 May 2015 08:30:31 +0200 [thread overview]
Message-ID: <20150514063031.GG4834@ws.net.home> (raw)
In-Reply-To: <20150513212052.GM27477@hex.shelbyville.oz>
On Thu, May 14, 2015 at 06:50:52AM +0930, Ron wrote:
> Right, in the situation where you *do* want multiple values, caring
> about the order should be less of a problem, since you'd just access
> the variables being set rather than trying to parse or interpret
> them literally. If for some reason you did care about the order,
> you'd run that multiple times with one value for each invocation.
>
> Which, right now if you do that, you'll end up with something like:
>
> # blkid -s UUID -o export /dev/sda2; blkid -s TYPE -o export /dev/sda2
> DEVNAME=/dev/sda2
> UUID=9621a7e3-14a1-4d03-8250-b4fbeb79999b
> DEVNAME=/dev/sda2
> TYPE=ext4
>
> I guess the other case where that might bite you is if you were already
> using DEVNAME as a local variable for something else ...
I'd like to keep blkid as very basic command line interface to
libblkid and as the library test program. For standard use cases
and scripts it's better to use lsblk(8) command which provides
more information and better control on output format:
# lsblk --pairs -o FSTYPE,UUID /dev/sda2
FSTYPE="ext4" UUID="c5490147-2a6c-4c8a-aa1b-33492034f927"
# lsblk --pairs -o UUID,FSTYPE /dev/sda2
UUID="c5490147-2a6c-4c8a-aa1b-33492034f927" FSTYPE="ext4"
and it reads information from udev db or from libblkid.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2015-05-14 6:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150512132634.1127.8640.reportbug@hex.shelbyville.oz>
2015-05-13 6:36 ` Bug#785116: util-linux: blkid -s returns too much information Andreas Henriksson
2015-05-13 10:37 ` Karel Zak
2015-05-13 21:20 ` Ron
2015-05-14 6:30 ` Karel Zak [this message]
2015-05-15 9:35 ` Andreas Henriksson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150514063031.GG4834@ws.net.home \
--to=kzak@redhat.com \
--cc=785116@bugs.debian.org \
--cc=andreas@fatal.se \
--cc=ron@debian.org \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox