X-Git-Url: https://git.ralfj.de/multypo.git/blobdiff_plain/48457df920b6f2c3747baa57366cc23389b3caca..refs/heads/master:/play.sh diff --git a/play.sh b/play.sh index d9367ef..b427eee 100755 --- a/play.sh +++ b/play.sh @@ -2,6 +2,8 @@ # you should probably download a txt dictionary of your favourite language and use that as a words.txt +cd "$(readlink -e $(dirname "$0"))" + WORDSTOPLAY=10 WORDSFILE="$1" if [[ -z "$WORDSFILE" ]]; then @@ -9,5 +11,9 @@ if [[ -z "$WORDSFILE" ]]; then fi export LC_ALL=C # dont do unicode stuff in egrep -sort -R "$WORDSFILE" | sed 's/\/.*//' | egrep '^[A-Za-z]{5,}$' | head -n $WORDSTOPLAY | tr [:upper:] [:lower:] | qt/multypo +while true; do + sort -R "$WORDSFILE" | sed 's/\/.*//' | egrep '^[A-Za-z]{5,}$' | head -n "$WORDSTOPLAY" | tr [:upper:] [:lower:] | qt/multypo + echo "Press Ctrl-C to quit" + sleep 3 +done