in reply to uid file finder
Thanks to vynce for pointing out the undef. Also to jeffa for:#!/usr/bin/perl -w open PASSWD, '/etc/passwd'; my @newarray; while (<PASSWD>){ my ($user,undef,$uid) = split(/:/); push (@newarray,$user) if $uid > 1000; } foreach $i (@newarray) { system ("find '/home/u1' -user $i -print > $i"); }
my ($user,$uid) = (split(/:/))[0,2];
|
|---|