view bin/gaseen @ 7393:f5989ee837a9

<hppavilion[2]> le/rn hppavilion/hppavilion is the generator including, but not limited to, hppavilion[1], hppavilion[2], and hppavilion[42]. hppavilion is of length 37-42i-28j+4k-28ij+38ik+62jk+20ijk
author HackBot
date Sat, 16 Apr 2016 20:42:55 +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)