title: Bash: One-liner to exit with the opposite status of a grep command?
body: <p>How can I reduce the following bash script?</p>
  
  <pre><code>grep -P "STATUS: (?!Perfect)" recess.txt &amp;&amp; exit 1
  exit 0
  </code></pre>
  
  <p>It seems like I should be able to do it with a single command, but I have a total of 3 here.</p>
  
  <p>My program should:</p>
  
  <ul>
  <li>Read recess.txt</li>
  <li>Exit 1 (or non-zero) if it contains a line with "STATUS: " of NOT "Perfect"</li>
  <li>Exit 0 if no such line exists (i.e. all "STATUS: " lines are "Perfect")</li>
  </ul>
  
  <p>The answer award goes to the tightest script.  Thanks!</p>
  
  <h1>Example files</h1>
  
  <p>Program should have <strong>exit status 0</strong> for this file:</p>
  
  <pre><code>FILE: styles.css 
  STATUS: Perfect!
  
  FILE: contour-styles.css
  STATUS: Perfect!
  </code></pre>
  
  <p>Program should have <strong>exit status 1</strong> (or non-zero) for this file:</p>
  
  <pre><code>FILE: styles.css 
  STATUS: Perfect!
  
  FILE: contour-styles.css
  STATUS: Busted 
  FAILURES: 1 failure
  
  Id's should not be styled
         1. #asdf
  </code></pre>