title: How to print lines that only contain characters from a list in BASH?
body: <p>I have a file called "dictionary.txt" containing a list of all possible words, e.g.:</p>
  
  <pre><code>a
  aardvark
  act
  anvil
  ate
  ...
  </code></pre>
  
  <p>How can I search this, only printing lines containing letters from a limited list, e.g., if the list contains the letters "c", "a", and "t", a search will reveal these words:</p>
  
  <pre><code>a
  act
  cat
  </code></pre>
  
  <p>If the letters "e", "a", and "t" are searched, only these words are found from "dictionary.txt":</p>
  
  <pre><code>a
  ate
  eat
  tea
  </code></pre>
  
  <p>The only solution I have managed is this:</p>
  
  <ul>
  <li>Create a list of all possible letters.</li>
  <li>Delete the searched letters from this list, leaving a list of letters that I do not want to search for.</li>
  <li>With a for loop cycling each of those letters, delete all lines from the dictionary that contains those letters.</li>
  <li>Print the remaining words found in the dictionary.</li>
  </ul>
  
  <p>This solution is very slow. Also, I need to use this code with other languages, which have thousands of possible characters, so this search method is especially slow.</p>
  
  <p>How can I print only those lines from "dictionary.txt" that only contain the searched-for-letters, and nothing else?</p>