diff options
author | epoch <epoch@hacking.allowed.org> | 2019-05-18 18:47:57 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2019-05-18 18:47:57 -0500 |
commit | ac8746f57ca9ef5baa953c7a2ff4e4128f649f9a (patch) | |
tree | 4a86987dad3c0a82f4c2c2a8bc9fe611ea6247a2 /share/hackvr | |
parent | fe1c6c2c16ce0a36840814fd1f9be6728b22b990 (diff) | |
download | hackvr-ac8746f57ca9ef5baa953c7a2ff4e4128f649f9a.tar.gz hackvr-ac8746f57ca9ef5baa953c7a2ff4e4128f649f9a.zip |
nulling errors from grep and shuf in the game.sh for wordsearch
Diffstat (limited to 'share/hackvr')
-rwxr-xr-x | share/hackvr/examples/wordsearch/game.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/share/hackvr/examples/wordsearch/game.sh b/share/hackvr/examples/wordsearch/game.sh index 0505760..3c30be1 100755 --- a/share/hackvr/examples/wordsearch/game.sh +++ b/share/hackvr/examples/wordsearch/game.sh @@ -2,14 +2,14 @@ ## you might want to edit these to suit your tastes. width=10 height=$width -words_per_puzzle=$[width+2] +words_per_puzzle=$[width] x=$[-10 * $width / 2] y=$[10 * $width / 2] z=0 clicked="" wordlist=/usr/share/dict/words echo derp -wordsearch -w <(shuf $wordlist | grep '^.\{1,'"$width"'\}$' | head -n $words_per_puzzle | tee /dev/stderr) --columns $width --rows $height --text | tail -n+4 | head -n $height | while read -r line;do +wordsearch -w <(shuf $wordlist 2>/dev/null | grep '^.\{1,'"$width"'\}$' 2>/dev/null | head -n $words_per_puzzle | tee /dev/stderr) --columns $width --rows $height --text | tail -n+4 | head -n $height | while read -r line;do echo "$line" | tr -d ' ' | fold -w 1 | while read letter;do name="_${x}_${y}" printf "%s addshape 2 4 %s %s %s %s %s %s %s %s %s %s %s %s\n" \ |