Method: Mac::Group#gid_next
- Defined in:
- lib/beaker/host/mac/group.rb
#gid_next ⇒ Fixnum
Gives the next gid not used on the system
93 94 95 96 |
# File 'lib/beaker/host/mac/group.rb', line 93 def gid_next gid_last = execute("dscl . -list /Groups PrimaryGroupID | sort -k 2 -g | tail -1 | awk '{print $2}'") gid_last.to_i + 1 end |