Re: [libvirt PATCH 03/19] commandhelper: Simplify envsort

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

 



On Fri, Jan 29, 2021 at 17:16:13 +0100, Tim Wiederhake wrote:
> Comparing only the keys produces the same result as comparing keys and
> value. The latter saves two invocations of each `strndup` and `free`.

env variable names allow also ascii chars with lower index than '=' such
as numbers:

$ TEST=asdf TEST1=asdf env | grep TEST | LANG=C sort
TEST1=asdf
TEST=asdf
$ TEST=asdf TEST1=asdf env | grep TEST | cut -d "=" -f 1 | LANG=C sort
TEST
TEST1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux