21 lines
278 B
Perl
21 lines
278 B
Perl
#!/usr/bin/perl
|
|
|
|
use warnings;
|
|
use strict;
|
|
|
|
my $fn;
|
|
my $cmd_out;
|
|
|
|
$fn = "/tilde/lyadmin/user_list.txt";
|
|
|
|
open FILE, "<", $fn or die "could not open $fn";
|
|
|
|
$cmd_out = `ls /home`;
|
|
chomp $cmd_out;
|
|
|
|
while(<FILE>){
|
|
chomp;
|
|
`userdel $_` unless($cmd_out =~ /$_/);
|
|
}
|
|
close FILE;
|