view paste/paste.19593 @ 5101:13ae4f023df4

<fizzie> ! glass {M[mxA!yO!a<1>=b<0>=c<10>=/ccc*<1>xs.?=b*y(on).?" "yo.?\\]}
author HackBot
date Sat, 18 Oct 2014 21:54:36 +0000
parents 1794894163e2
children
line wrap: on
line source

#!/bin/sh
cd /var/irclogs/_esoteric
if [ "$1" ]; then
    grep -P -i -- "$1" ????-??-??.txt | shuf -n 1
else
    file=$(shuf -en 1 ????-??-??.txt)
    echo "$file:$(grep "<.*>" $file | shuf -n 1)" | sed "s=<[^>]*> =="
fi