view paste/paste.18999 @ 5065:bb21261948dc

<fizzie> rm bin/bf; echo $\'#! /bin/bash\\n[[ $# > 0 ]] || { echo "Run what?"; exit 1; }\\nci="$*"\\necho -n "${ci#*!}" | echo /hackenv/interps/egobfi/src/egobfi8 <(echo -n "${ci%%!*}")\' > bin/bf; chmod +x bin/bf
author HackBot
date Wed, 15 Oct 2014 23:47:10 +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