I am making a word game and I am wondering how to find and arrange words in a list that have the same letters. In my game, you are presented with 5 letters, and you then have to rearrange the letters tp make a word. So the word could be "acorn", but those 5 letters could also make up "narco" or "racon" which are words in my .txt dictionary (shown on the left).
Basically I need to find out how to index the master list automatically, because my list is 3000 words long so it would take too long to go through every word manually. Can sed or grep do this?
And I tried running the script, but it doesn't print out anything. I made it search for a word which I knew had anagrams, but it just doesn't do anything. Is it easy to make it write to a new .txt file instead to more easily verify that it works?