bimleshsharma has asked for the wisdom of the Perl Monks concerning the following question:
I want to grep lines from log that is updated in last 10 mints. I tried with below but not getting result.
my $line= `awk -v start="$(date -d '10 mins ago' +'%b %e %T')" -v end +="$(date +'%b %e %T')" '{tm=$1" "$2" "$3}; start<tm&&tm<end' /d/d1/l +ogs/stdout-1132.txt` print "$line";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: grep lines from log for last 10 mints
by Anonymous Monk on Aug 06, 2012 at 09:55 UTC | |
by Anonymous Monk on Aug 06, 2012 at 10:11 UTC | |
by Anonymous Monk on Aug 06, 2012 at 10:30 UTC | |
by bimleshsharma (Beadle) on Aug 06, 2012 at 11:14 UTC | |
by Anonymous Monk on Aug 07, 2012 at 09:22 UTC | |
Re: grep lines from log for last 10 mints
by aitap (Curate) on Aug 06, 2012 at 11:42 UTC | |
by bimleshsharma (Beadle) on Aug 07, 2012 at 09:11 UTC | |
by aitap (Curate) on Aug 07, 2012 at 09:42 UTC | |
Re: grep lines from log for last 10 mints
by i5513 (Pilgrim) on Aug 06, 2012 at 10:18 UTC |
Back to
Seekers of Perl Wisdom