Mercurial > repo
comparison YUeK @ 1648:801f3b6bfa53
<c00kiemon5ter> fetch http://sprunge.us/YUeK
author | HackBot |
---|---|
date | Tue, 22 Jan 2013 14:51:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1647:3a1400348ad8 | 1648:801f3b6bfa53 |
---|---|
1 #!/usr/bin/env bash | |
2 trap 'kill -TERM 0' EXIT | |
3 | |
4 read s <<< "$1" | |
5 files=(/var/irclogs/_esoteric/????-??-??.txt) | |
6 | |
7 for file in "${file[@]:${#files[@]} - 30}" | |
8 do { | |
9 line= | |
10 while read -r t n m; do [[ $n =~ $s ]] && line="$t $n $m"; done <"$file" | |
11 [[ -n "$line" ]] && { printf '%s:%s\n' "${file##*/}" "$line"; exit; } | |
12 } & | |
13 done | |
14 | |
15 wait && echo 'well, not lately' | |
16 |