view paste/paste.19593 @ 11157:3467749980d9

<int-e> learn The Boredome is a dangerous place swarming with woodpeckers, dentists, and bookworms.
author HackBot
date Sun, 20 Aug 2017 12:27:15 +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