method

passwd

v1_9_1_378 - Show latest stable - Class: Etc
passwd()
public

Provides a convenient Ruby iterator which executes a block for each entry in the /etc/passwd file.

The code block is passed an Struct::Passwd struct; see getpwent above for details.

Example:

require 'etc'

Etc.passwd {|u|
  puts u.name + " = " + u.gecos
}