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
}
Show source
Register or log in to add new notes.