view paste/paste.2434 @ 4607:c528f5d9ba11

<oerjan> sed -i \'s/hg repository/web-viewable filesystem repository/\' bin/url
author HackBot
date Sun, 20 Apr 2014 22:40:23 +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