annotate paste/paste.19593 @ 12500:e48c08805365 draft default tip

<b_jonas> ` learn \'The password of the month is Cthulhuquagdonic Mothraquagdonic Narwhalicorn.\' # https://logs.esolangs.org/libera-esolangs/2024-04.html#lKE Infinite craft
author HackEso <hackeso@esolangs.org>
date Wed, 01 May 2024 06:39:10 +0000
parents 1794894163e2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
343
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
1 #!/bin/sh
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
2 cd /var/irclogs/_esoteric
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
3 if [ "$1" ]; then
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
4 grep -P -i -- "$1" ????-??-??.txt | shuf -n 1
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
5 else
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
6 file=$(shuf -en 1 ????-??-??.txt)
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
7 echo "$file:$(grep "<.*>" $file | shuf -n 1)" | sed "s=<[^>]*> =="
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
8 fi
1794894163e2 <ais523> paste bin/anonlog
HackBot
parents:
diff changeset
9