Re: Bug in lsblk command or man page?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 24, 2020 at 11:14:04AM +1000, David O'Brien wrote:
> I don't know if this is expected or not, but it seems very odd:
> 
> # lsblk -o=UUID /stratis/labpool/labfs
> lsblk: unknown column: =UUID
> 
> [root@serverb ~]# lsblk -o UUID /stratis/labpool/labfs
> UUID
> 0118efb8-66fe-406a-837c-725961bdad4d
> 
> [root@serverb ~]# lsblk --output=UUID /stratis/labpool/labfs
> UUID
> 0118efb8-66fe-406a-837c-725961bdad4d
> 
> 
> From the man(8) page:
> -o, --output list
>               Specify which output columns to print.  Use --help to get
>               a list of all supported columns.  The columns may affect
>               tree-like output.  The default is to use tree for the
>               column 'NAME' (see also --tree).
> 
>               The default list of columns may be extended if list is
>               specified in the format +list (e.g., lsblk -o +UUID).
> 
> There is no mention of "=" being required, causing failures, etc. I found this quite frustrating.
> 

This is common getopt_long() behavior where equal sign is usable only for
long options (and sometimes for optional arguments).

 lsblk -o UUID
 lsblk --output UUID
 lsblk --output=UUID

this is how "=" works in almost all commands and I don't see reason
why we need to be explicit about it for "lsblk -o".

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux