Mercurial > repo
annotate bin/anonlog @ 367:1e9ba72e22bc
<nortti> pastefortunes
author | HackBot |
---|---|
date | Mon, 30 Apr 2012 11:13:24 +0000 |
parents | 47a91a806235 |
children |
rev | line source |
---|---|
338
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
1 #!/bin/sh |
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
2 cd /var/irclogs/_esoteric |
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
3 if [ "$1" ]; then |
345
47a91a806235
<ais523> run sed -i '/grep -P/s/$/| sed "s=<[^>]*> =="/' bin/anonlog
HackBot
parents:
341
diff
changeset
|
4 grep -P -i -- "$1" ????-??-??.txt | shuf -n 1| sed "s=<[^>]*> ==" |
338
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
5 else |
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
6 file=$(shuf -en 1 ????-??-??.txt) |
341
d18ed389b1c3
<ais523> run sed -i 's/shuf -n 1 $file/grep "<.*>" $file | shuf -n 1/' bin/anonlog
HackBot
parents:
340
diff
changeset
|
7 echo "$file:$(grep "<.*>" $file | shuf -n 1)" | sed "s=<[^>]*> ==" |
338
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
8 fi |
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
9 |