view bin/log @ 10509:2b7ce722bfa2

<wob_jonas> `` >bin/starwars echo $\'#!perl\\n\'\'@c=split/\\|/,"M0|M1|M2";print$c[rand@c],"\\n";\' && chmod -c a+x bin/starwars
author HackBot
date Sun, 26 Mar 2017 01:56:33 +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