title: While file doesn't contain string BASH
body: <p>I am making a script for my school, and I was wondering how I could check a file, and if the string isn't in the file, do a code, but if it is, continue, like this:</p>
  
  <pre><code>while [ -z $(cat File.txt | grep "string" ) ] #Checking if file doesn't contain string
  do
      echo "No matching string!, trying again" #If it doesn't, run this code
  done
  echo "String matched!" #If it does, run this code
  </code></pre>