https://github.com/vvelox/sys-group-gidhelper
Helps for locating free GIDs using getgrgid.
https://github.com/vvelox/sys-group-gidhelper
Last synced: 16 days ago
JSON representation
Helps for locating free GIDs using getgrgid.
- Host: GitHub
- URL: https://github.com/vvelox/sys-group-gidhelper
- Owner: VVelox
- Created: 2023-12-04T07:32:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-04T08:01:26.000Z (over 1 year ago)
- Last Synced: 2025-02-17T01:42:31.946Z (3 months ago)
- Language: Perl
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
Awesome Lists containing this project
README
# Sys-Group-GIDhelper
Helps for locating free GIDs using getgrgid.
```perl
use Sys::Group::GIDhelper;# invokes it with the default values
my $foo = Sys::Group::GIDhelper->new();# sets the min to 2000 and the max to 4000
$foo = Sys::Group::GIDhelper->new(min=>2000, max=>4000);# finds the first free one
my $first = $foo->firstfree;
if(defined($first)){
print $first."\n";
}else{
print "not found\n";
}# finds the last free one
my $last = $foo->lastfree;
if(defined($last)){
print $last."\n";
}else{
print "not found\n";
}
```