view bin/seen @ 1616:69c3cce98e53

<fizzie> mv bin/seen2 bin/seen # meh, good enough
author HackBot
date Tue, 22 Jan 2013 10:27:59 +0000
parents bd01552d7f51
children 1dbbfd962f22
line wrap: on
line source

#! /usr/bin/env perl
$n=shift @ARGV; $n=~s/ *$//; @f=split /\s+/, `ls -r /var/irclogs/_esoteric/????-??-??.txt | head -n 30`; for $f (@f) { open F,"<$f"; @l=grep(/^..:..:..: <$n>/i,<F>); close F; if (@l) { $b=$f; $b=~s#.*/(.*?).txt#$1#; print "$b $l[-1]"; exit 1; } } print "not lately";