view paste/paste.19593 @ 2364:75c80c422f30

<Jafet> sed -i "2 s#.*#import random; w=[l.split() for l in open(\'/dev/stdin\').read().split(\'\\n\')]; r=[4,7,8,9,2,13,6]; print \'\\n\'.join((lambda s: \' \'.join(chr(3) + str(r[(i+s)%len(r)]) + l[i] for i in range(len(l)))(random.randrange(0, len(r))))#" $(which rainwords)
author HackBot
date Mon, 04 Mar 2013 10:31:19 +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