On Monday, February 2, 2004, 8:14:50 AM, Mark wrote:

> On Sun, Feb 01, 2004 at 08:43:11PM +0100, Robert K. wrote:
>> >Maybe something like this
>> >
>> >ruby -naF: -e 'printf "%s\t%s\n", $F[0], $F[5]' /etc/passwd
>> >
>> 
>> Is this always applicable? For example in an NIS+ env
>>  - that's why I'm asking.

> Definitely not.  NIS, NIS+, NetInfo, non-UNIX POSIX environments, . . .
> all sorts of different places the info could be.  What is needed is a
> Ruby interface to the getpwent() family of system calls.
> I don't see any such thing in the standard library, RAA, or Ruby Forge;
> maybe I'm just not looking in the right place, or maybe you have just
> discovered your first module project! :)

require 'etc'

(Should be in PickAxe, definitely in Nutshell.)

Gavin