view paste/paste.18999 @ 7430:65a81a334221

<b_jonas> `` echo -n \'lly not in that order, so they get their personal problems taken care of before the final battle. And it\'\'s a comedy.\' > wisdom/o
author HackBot
date Sun, 17 Apr 2016 21:27:32 +0000
parents ab2c49f31e97
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