Mercurial > repo
view bin/seen2 @ 1614:04703504abee
<fizzie> echo \'$n=shift @ARGV; $n=~s/ *$//; @f=split /\\s+/, `ls -r /var/irclogs/_esoteric/????-??-??.txt | head -n 5`; 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";\' >> bin/seen2
author | HackBot |
---|---|
date | Tue, 22 Jan 2013 10:23:33 +0000 |
parents | 2247f569f099 |
children | c9dec74a72e7 |
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 5`; 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";