master
E. Almqvist 3 years ago
parent b69d77a242
commit 6328be52f7
  1. 5
      prog2/wordle/thing.sh

@ -3,9 +3,6 @@
words=/usr/share/dict/words words=/usr/share/dict/words
thing=$(ruby calc.rb $1 $2) thing=$(ruby calc.rb $1 $2)
echo $thing
fivewords=$(cat $words | awk '{print tolower($0)}' | grep -E '^[[:alpha:]]{5}$') fivewords=$(cat $words | awk '{print tolower($0)}' | grep -E '^[[:alpha:]]{5}$')
echo $fivewords echo $fivewords | sed 's/ /\n/g' | grep -E "^${thing}"
#| grep -E '\b${thing}'

Loading…
Cancel
Save