view bin/gaseen @ 8897:c7b65d0fe2f2

<shachaf> ` ln -s relcome bin/\x0304w\x0308e\x0309l\x0311c\x0312o\x0313m\x0304e\x0f
author HackBot
date Thu, 04 Aug 2016 02:22:10 +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)