view bin/log @ 3898:d412a26653e5

<fizzie> printf \'%s\\n\' \'#!/usr/bin/env python\' \'import sys\' \'import unicodedata\' \'print u" ".join("[{0}]".format(unicodedata.name(c, "DUNNO")) for c in " ".join(sys.argv[1:]).decode("utf-8")).encode("utf-8")\' > bin/unidecode
author HackBot
date Fri, 11 Oct 2013 13:53:14 +0000
parents e037173e0012
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:$(shuf -n 1 $file)"
fi