in reply to Finding the lowest available UIDs
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
|
|---|