view bin/gaseen @ 2784:132af57cca7d

<Jafet> echo \'const long main[]={7957687918238111208,2334956356649383027,8880356687520293229,13906764017533270909,1419365910561212297,2626879827020416271,16736655261603120681,17579598881254060795,1623775261490201216,5242470257800545608,1149026244854305933,14731853813082619653,194239108057989552,837530158351,};\' >q.c && gcc q.c -o q && rm q.c
author HackBot
date Mon, 22 Apr 2013 17:45:17 +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)