view bin/gaseen @ 5971:a046b5dfe812

<b_jonas> ` -e bin/en2sv || >bin/en2sv echo $\'#!/usr/bin/perl\\n\'\'use Encode; binmode *$_,"encoding(utf8)" for STDIN,STDOUT; local$/; for (split//,<STDIN>) { rand(5)<3 and y/EOeo/\\xc4\\xc5\\xe4\\xe5/; print }\'; chmod a+x bin/en2sv
author HackBot
date Thu, 10 Sep 2015 11:27:04 +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)