Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
On 09/02/2013 03:02 PM, Pádraig Brady wrote:
> On 09/01/2013 10:35 PM, Bernhard Voelker wrote:
>> I was reluctant to use getent(1) to get a reasonable list of users.
>> Is that portable on all supported platforms?
>> Therefore, I've just used /etc/passwd.
>> Now as I'm writing this, I'm sure this will fail with NIS
>> where a "+" entry is used. Can I use "getent passwd"?
>
> Tests are more flexible in that we can skip where not supported.
> This works on GNU/Linux, Solaris and FreeBSD at least:
>
> getent passwd | cut -d: -f1
>
> So I'd try that || skip_ 'getent is not available'
Cygwin is a typical platform with whitespaces in group names, but
it seems to lack getent(1). Well, it's not our primary target,
though.
Thanks for the advice.
Have a nice day,
Berny