view bin/anonlog @ 2266:4767030cee0e

<elliott> addquote <ais523> Phantom_Hoover: my department teaches prolog, to second years I think <ais523> some people choose it because it isn\'t ocaml, and then are disappointed to find it has lists
author HackBot
date Tue, 26 Feb 2013 18:41:42 +0000
parents ee2e8950bb3c
children
line wrap: on
line source

#!/bin/sh
cd /var/irclogs/_esoteric
if [ "$1" ]; then
    grep -P -i -- "$1" ????-??-??.txt | shuf -n 1| sed "s=<[^>]*> =="
else
    file=$(shuf -en 1 ????-??-??.txt)
    echo "$file:$(grep "<.*>" $file | shuf -n 1)" | sed "s=<[^>]*> =="
fi