I'm trying to make a scrabble helper in bash, which when given a list of characters, finds all the words in the /usr/share/dict/words file.For example, when given the letters a,c,r,tThe word cart will matchThe word car will also matchThe word carat will not match   However, if a,a,c,r,t were givenThen carat would have matched.I am trying to find if it is possible only using grep, I suspect that brace expansions like{a,c,r,t}{a,c,r,t} might be useful to generate all the possible combinations of the letters but instead I am greeted with the errors like    grep: aaac: No such file or directorygrep: aaar: No such file or directorygrep: aaat: No such file or directory   when running the command$ grep {a,c,r,t}{a,c,r,t}{a,c,r,t}{a,c,r,t} /usr/share/dict/wordsWhen I use quotes like {a,c,r,t}{a,c,r,t} or \{a,c,r,t\}\{a,c,r,t\}, brace expansion does not work at allI know that the above command should not work as a scrabble helper but the errors are still rather unexpected. What is wrong with the command and how do I fix it? Also, can grep be used some way to make a scrabble helper at all?Forgive me if I sound like a newbie, it's because I am a recent Windows to Linux convert.
Scrabble helper in bash
grep;brace expansion;patterns