Mercurial > repo
changeset 1638:e491c5d15cbd
<fizzie> mv bin/seen2 bin/seen
author | HackBot |
---|---|
date | Tue, 22 Jan 2013 13:56:02 +0000 |
parents | de1bcdc1f6bf |
children | 24ae44f3a955 |
files | bin/seen bin/seen2 |
diffstat | 2 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/seen Tue Jan 22 13:55:45 2013 +0000 +++ b/bin/seen Tue Jan 22 13:56:02 2013 +0000 @@ -1,2 +1,2 @@ #! /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#.*/##; print "$b:$l[-1]"; exit 1; } } print "not lately"; +($n,$e)=split /\s+/, join(" ",@ARGV); $n=~s/ *$//; $c="ls -r /var/irclogs/_esoteric/????-??-??.txt"; $c.=" | head -n 30" unless $e eq "ever"; @f=split /\s+/, `$c`; 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";
--- a/bin/seen2 Tue Jan 22 13:55:45 2013 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -#! /usr/bin/env perl -($n,$e)=split /\s+/, join(" ",@ARGV); $n=~s/ *$//; $c="ls -r /var/irclogs/_esoteric/????-??-??.txt"; $c.=" | head -n 30" unless $e eq "ever"; @f=split /\s+/, `$c`; 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";