Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # CodeMonkey 3000
- # version 0.2
- myMarkList=('. ' ', ' '! ' '? ' '\n' )
- _words=/usr/share/dict/german
- #check for words
- if [ ! -s $_words ]; then
- echo No words found at \"${_words}\"!; exit 1
- fi
- #check for shuf
- if ! command -v shuf > /dev/null; then
- echo "shuf needs to be installed!"; exit 1
- fi
- function getRandomMarker {
- _markIndex=$(( $RANDOM % ${#myMarkList[*]} ))
- _mark=${myMarkList[ ${_markIndex} ]}
- printf "$_mark"
- }
- _sleepTime=0.2
- _wordCount=6
- while true
- do
- echo -n $(shuf -n $(($RANDOM % $_wordCount + 1)) $_words); getRandomMarker
- sleep $_sleepTime
- done
Add Comment
Please, Sign In to add comment