You are playing Wordle and having a hard time finding a 5-letter word?

There are 5883 of them in /usr/share/dict/words:

$ egrep '^[[:alpha:]]{5}$' /usr/share/dict/words | sort -fu | wc -l

In combination with an old Perl script random

#! /usr/bin/perl -w

srand ($$ ^ time);

$i = rand($#ARGV +1);
print $ARGV[$i];

you can make the first move:

$ random `egrep '^[[:alpha:]]{5}$' /usr/share/dict/words | sort -fu`; echo

Aim for a common word without repeating letters.


None of them are in it? Try again without these letters.

$ random `egrep '^[[:alpha:]]{5}$' /usr/share/dict/words | sort -fu | egrep -iv 'l|i|k|e|s'`; echo

🟩⬜🟨🟨⬜ looks a lot better. No A and R in the word. The M is at the right place.

Only 2 possible words left:

$ egrep -i '^m.[^n][^o].$' /usr/share/dict/words | sort -fu | egrep -iv 'l|i|k|e|s|a|r' | grep -i n | grep -i o

And that’s it:

Wordle 222 3/6