in reply to (OT) Korne Shell Parameter...
Yes, it's not perl ;-)
#!/usr/bin/perl use strict; use warnings; my $uid = $ARGV[0]; open (my $fh, '<', '/etc/passwd') or die "Can't open passwd file: $!"; while (<$fh>){ my $this_uid = (split m/:/)[2]; print if $this_uid > $uid; } close $fh;
|
|---|