s/warning/warnings/ thanks to Your Mother in /msg#!/usr/bin/perl use strict; use warnings; my %used; while (my @entry = getpwent) { my $uid = $entry[2]; next if $uid < 200 || $uid > 250; $used{$uid} = 1; } for (200 .. 250) { next if $used{$_}; print "$_ is free\n"; }
Cheers - L~R
In reply to Re: Finding the lowest available UIDs
by Limbic~Region
in thread Finding the lowest available UIDs
by ronix
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |