view bin/anonlog @ 8309:b9ced0a7783a

<izabera> ` printf \'#!/bin/bash\\ndeclare {{a..h},{j..t}}="$((i++))" letters=({{a..h},{j..t}}); while read -r; do echo "${letters[18-${REPLY:0:1}]}$((20-${REPLY:1}))"; done\\n\' > bin/mirrorgo
author HackBot
date Fri, 03 Jun 2016 17:28:15 +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