Mercurial > repo
comparison bin/seen @ 1632:295ac4f70bdd
<fizzie> sed -i -e \'s/$b $l/$b:$l/\' bin/seen
author | HackBot |
---|---|
date | Tue, 22 Jan 2013 13:48:56 +0000 |
parents | 1dbbfd962f22 |
children | e491c5d15cbd |
comparison
equal
deleted
inserted
replaced
1631:620bcedcadee | 1632:295ac4f70bdd |
---|---|
1 #! /usr/bin/env perl | 1 #! /usr/bin/env perl |
2 $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#.*/##; print "$b $l[-1]"; exit 1; } } print "not lately"; | 2 $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#.*/##; print "$b:$l[-1]"; exit 1; } } print "not lately"; |