markov script
This commit is contained in:
parent
e28287e692
commit
8666124274
1 changed files with 15 additions and 0 deletions
15
bin/markov
Executable file
15
bin/markov
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cat ~/irclogs/tc/* | grep '>' | awk '{$1=""; $2=""; $3=""}1' | shuf -n 500000 > /tmp/markylol
|
||||||
|
|
||||||
|
nextword(){ awk '{for (I=1;I<=NF;I++) if ($I == "'$1'") {print $(I+1)};}' /tmp/markylol | shuf -n 1 ; }
|
||||||
|
|
||||||
|
|
||||||
|
PASTWORD=$1
|
||||||
|
|
||||||
|
makesent(){ printf "$PASTWORD " ; PASTWORD=`nextword $PASTWORD | tr '"' "'"` ; [ -z "$PASTWORD" ] || makesent ; }
|
||||||
|
|
||||||
|
makesent
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
Loading…
Reference in a new issue