|
|
|
Re: blkid -o value | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On 3/27/2012 1:31 PM, Ted Ts'o wrote:
On Tue, Mar 27, 2012 at 01:26:14PM -0400, Michael Conrad wrote:I would request that either the order of fields become stable by printing empty lines for missing fields (and documented), or the "-o value" be done away with, since I can't see any reason anyone would want random output in a script-friendly format, and the fact that it exists is likely to lead people astray.Try using this way, which was its intended usage: blkid -o value -s TYPE -t UUID=a3dc6f56-da22-4079-bf75-1fa2ce1aa4b0 (replace part following -t with the search criteria you want; for example, "-t LABEL=backup"). It was intended to be used a script-friendly way, and I believe there are shell scripts using in this fashion. So please don't change blkid -o value.
I see how that could be useful if and only if you use exactly one "-s", but if you requested more than one "-s" they still come out in non-stable order. It's like running a SQL query and having all the columns shifted because the first one was a NULL. If you're on a system where all the volumes have labels, types, and uuids (and nothing else) it's very misleading.
At the very least, I would appreciate it if the man page mentioned that "-o value" should only ever be used with exactly one "-s".
-Mike -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]