Mercurial > repo
annotate bin/anonlog @ 338:2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
author | HackBot |
---|---|
date | Sun, 29 Apr 2012 02:35:14 +0000 |
parents | |
children | e9c4f64872b5 |
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 |
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
4 grep -P -i -- "$1" ????-??-??.txt | shuf -n 1 |
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) |
2105e89ffe69
<ais523> run sed '/echo/s/$/ | sed "s=<[^>]*>=="/' < bin/log > bin/anonlog
HackBot
parents:
diff
changeset
|
7 echo "$file:$(shuf -n 1 $file)" | sed "s=<[^>]*>==" |
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 |