view bin/bseen @ 1773:8578983f1250

<shachaf> echo \'welcome "$@" | h\' > bin/wehlcohme; chmod +x bin/wehlcohme
author HackBot
date Fri, 25 Jan 2013 13:32:20 +0000
parents d32a6933bc5d
children
line wrap: on
line source

#!/usr/bin/env bash
s="<${1% }>"
while ((i++ < 30)) && read -r file; do
	line=
	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 < <(ls -r /var/irclogs/_esoteric/????-??-??.txt)
echo 'well, not lately'