view paste/paste.18999 @ 8471:3a33aa4ab667

<oerjan> le/rn tanebvention/Tanebventions include automatic squirrel feeders, necessity, Go, submarine jousting, the universe, weetoflakes, persistence, the BBC, progress, and this sentence. See also tanebventions (math). He never invents anything involving sex.
author HackBot
date Mon, 13 Jun 2016 07:55:16 +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