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  <k...@redhat.com>
 http://karelzak.blogspot.com


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to