annotate paste/paste.18999 @ 12296:042127c1c142 draft

<fizzie> ` rm /hackenv/bin/bfi; ln -s /hackenv/lib/kps/bfi /hackenv/bin/bfi # no need for actual copies that you can forget to delete though
author HackEso <hackeso@esolangs.org>
date Sat, 04 Jan 2020 13:28:36 +0000
parents ab2c49f31e97
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
337
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
1 #!/bin/sh
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
2 cd /var/irclogs/_esoteric
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
3 if [ "$1" ]; then
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
4 grep -P -i -- "$1" ????-??-??.txt | shuf -n 1
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
5 else
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
6 file=$(shuf -en 1 ????-??-??.txt)
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
7 echo "$file:$(shuf -n 1 $file)"
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
8 fi
ab2c49f31e97 <ais523> paste bin/log
HackBot
parents:
diff changeset
9