Sha256: dcdca7a7fb3261f75c47de5ea2ee8758cd36865dd17f0ace7b99ecf15c8c7df4

Contents?: true

Size: 556 Bytes

Versions: 16

Compression:

Stored size: 556 Bytes

Contents

###########################################################################
# groups.rb
#
# Sample script to demonstrate some of the various group methods.  Alter
# as you see fit.
###########################################################################
require "pp"
require "sys/admin"
include Sys

if File::ALT_SEPARATOR
  pp Admin.get_group("guests")
  pp Admin.get_group(513)
else
  pp Admin.get_group("admin")
  pp Admin.get_group(7)
end

sleep 3

Admin.groups.each{ |g|
   pp g
   puts
}

# This should raise an error
Admin.get_group("fofofofof")

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sys-admin-1.8.4 examples/example_groups.rb
sys-admin-1.8.3 examples/example_groups.rb
sys-admin-1.8.2 examples/example_groups.rb
sys-admin-1.8.1 examples/example_groups.rb
sys-admin-1.8.0 examples/example_groups.rb
sys-admin-1.7.6 examples/example_groups.rb
sys-admin-1.7.5 examples/example_groups.rb
sys-admin-1.7.4 examples/example_groups.rb
sys-admin-1.7.3 examples/example_groups.rb
sys-admin-1.7.2 examples/example_groups.rb
sys-admin-1.7.1 examples/example_groups.rb
sys-admin-1.6.4 examples/example_groups.rb
sys-admin-1.6.3 examples/example_groups.rb
sys-admin-1.6.2 examples/example_groups.rb
sys-admin-1.6.1 examples/example_groups.rb
sys-admin-1.6.0 examples/example_groups.rb