Subversion Repositories sysadmin_scripts

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
156 rodolico 1
#! /usr/bin/perl -w
2
 
3
use Date::Parse;
4
use POSIX 'strftime';
5
 
6
# Separate colon delimited lines
7
 
8
while ($line = <>) {
9
   chomp $line; 
10
   ($filename, $constant, @date) = split (':', $line); 
11
   # @date is an array containing parts of the date/time
12
   # join them all together with colons, then use strptime
13
   # to turn them into a true date object (array, see localtime).
14
   # once that is done, we can pass it to strftime for pretty
15
   # formatting
16
   @date = strptime( join (':',@date) );
17
   $date = strftime '%F', @date;
18
   $filename =~ s/\.whois//;
19
   $filename =~ s/^.*cache\///;
20
   $date =~ s/^\s+//;
21
   print "$date\t$filename\n";
22
}
23
1;