view paste/paste.18999 @ 4492:02775a0b8839

<ion> sed -i -re \'s/echo ("?)\\$[@*]\\1 /print_args_or_input "$@" /g\' bin/complain bin/ord bin/ordu
author HackBot
date Sat, 22 Feb 2014 02:38:07 +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