Re: [RESEND][RFC] lscpu - CPU architecture information helper

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

 



On Thu, Jul 10, 2008 at 8:59 AM, Karel Zak <kzak@xxxxxxxxxx> wrote:

>  or git-like solution:
>
>    $ lspci --pretty=format:"%cpu %core %socket"
>
>  where you can also predefine a few basic formats
>  (--pretty={format,csv,...})

While I like the idea there I would suggest using some delimiter
around the field name, like this:

$ lspci --pretty=format:"%(cpu) %(core) %(socket)"

The point being this allows you to have a field called cpu and a field
called cpuvoltage, or fields called socket and sockettype.   FWIW,
Python does this, though it also uses a format directive (s for
strings, d for decimal integers etc) after the closing paren.

James.
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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