view bin/gaseen @ 2651:4c617ce2bbe1

<Jafet> echo -e \'\\x7fELF\\x02\\x01\\x01\\0\\0\\0\\0\\0\\0\\0\\0\\0\\x02\\0>\\0\\x01\\0\\0\\0x\\0@\\0\\0\\0\\0\\0@\\0\\0\\0\\0\\0\\0\\0\\xb0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0@\\08\\0\\x01\\0@\\0\\x03\\0\\x02\\0\\x01\\0\\0\\0\\x05\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0@\\0\\0\\0\\0\\0\\0\\0@\\0\\0\\0\\0\\0\\x9a\\0\\0\\0\\0\\0\\0\\0\\x9a\\0\\0\\0\\0\\0\\0\\0\\0\\0 \\0\\0\\0\\0\\0H\\xc7\\xc7\\x01\\0\\0\\0H\\xc7\\xc6\\x98\\0@\\0H\\xc7\\xc2\\x02\\0\\0\\0H\\xc7\\xc0\\x01\\0\\0\\0\\x0f\\x05\\xeb\\xf5y\' > bin/y && chmod +x bin/y
author HackBot
date Sat, 13 Apr 2013 22:29:43 +0000
parents 7b39af120554
children
line wrap: on
line source

#!/bin/bash
who="${1% }" who="${who,,}"
arr=(/var/irclogs/_esoteric/????-??-??.txt)
gawk -vw="$who" -vOFS=":" '
tolower($2) ~ w{x=$0} ENDFILE{if(x){print substr(FILENAME,1,10), x; exit}}
' < <(for ((i=${#arr[@]}-1; i>=0; i-- )); do echo ${arr[i]}; done)