dotfiles/bin/mark

16 lines
394 B
Text
Raw Normal View History

2020-07-01 19:55:58 +00:00
#!/bin/bash
2021-05-30 00:29:02 +00:00
grep -l "$1" ~/.local/share/catgirl/log/*/*/* | shuf -n 1 | tr "\n" " " | xargs cat | grep '>' > /tmp/markylol
2020-07-01 19:55:58 +00:00
nextword(){ awk '{for (I=1;I<=NF;I++) if ($I == "'$1'") {print $(I+1)};}' /tmp/markylol | sed '/^$/d' | shuf -n 1 ; }
PASTWORD=$1
makesent(){ printf "%b " "$PASTWORD" ; PASTWORD=`nextword $PASTWORD | tr '"' "'"` ; [ -z "$PASTWORD" ] || makesent ; }
makesent
echo