changeset 1658:006d0a0e7b28

<c00kiemon5ter> fetch http://sprunge.us/bQhS
author HackBot
date Tue, 22 Jan 2013 15:08:51 +0000
parents f4a718569da1
children 8c6a62fb55f5
files bQhS
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bQhS	Tue Jan 22 15:08:51 2013 +0000
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+trap 'kill -TERM 0' EXIT
+read s <<< "$1"; files=(/var/irclogs/_esoteric/????-??-??.txt)
+for i in "${!files[@]}"; do line=; file="${files[${#files[@]} - i]}"
+while read -r t n m; do [[ $n =~ $s ]] && line="$t $n $m"; done <"$file"
+[[ -n "$line" ]] && { printf '%s:%s\n' "${file##*/}" "$line"; exit;}; done
+echo 'well, not lately'
+