#!/usr/bin/perl
print "lastupdate-aix.pl - Prints users' last password update times.\n";
print "(C) 2013 KIM Taegyoon\n\n";
open my $in, "<", "/etc/security/passwd" or die $!;
while (<$in>) { # assigns each line in turn to $_
if (/^.+:$/) {print $_;} # ID
elsif (/lastupdate = (\d+)/) {print scalar localtime $1;}
}
print "lastupdate-aix.pl - Prints users' last password update times.\n";
print "(C) 2013 KIM Taegyoon\n\n";
open my $in, "<", "/etc/security/passwd" or die $!;
while (<$in>) { # assigns each line in turn to $_
if (/^.+:$/) {print $_;} # ID
elsif (/lastupdate = (\d+)/) {print scalar localtime $1;}
}
'My Computer Programs' 카테고리의 다른 글
(Perl) psh - Perl REPL (0) | 2013.09.24 |
---|---|
(Perl) lastpwchg.pl - prints users' last password change times (0) | 2013.09.23 |
(Paren) SweepSecondParen (0) | 2013.09.08 |
(Racket) SweepSecond (0) | 2013.08.22 |
webcheck (0) | 2013.08.08 |