Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    ( my $date ) = ( $line =~ /^(\w\w\w \d\d \d\d:\d\d:\d\d \d\d\d\d [-|\+
    +]\d\d\d\d)/ );
    
    print str2time( $date )."\n";
    
  2. or download this
    open (PIPE, "/path/to/tail -n 10 /path/to/logfile |");