1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#! /usr/bin/perl $ENV{"LC_ALL"} = "C"; while (<>) { if (/^(|-+)$/) { next; } elsif (/^(\S.*) - (.*@.*)$/) { # print "[" . $1 . "]\n"; open FH, 'date -u +"* %a %b %d %Y" -d "' . $1 . '" |'; while (<FH>) { chomp; print $_ . " - " . $2 . "\n"; } close FH; next; } elsif (/(- | +)(?!\s)/) { print; } }