title: Bash, If file is empty leave script if not continue
body: <p>the first command in my bash script is a grep from an existing file for errors.
  EX:</p>
  
  <pre><code>cat /usr/local/avamar/var/ddrmaintlogs/ddrmaint.log | grep "hfscheck-finish Backup directory missing for backup" &gt; PartialBackups
  cat PartialBackups | sed -n -e 's#^.*cur/ ##p' &gt;P2                                          
  cat P2 | sed 's#/# / /#g' &gt; P3                                                              
  cat P3 | awk {'print $1'} &gt;&gt; S1                                                              
  cat P3 | awk {'print $3'} &gt;&gt; S2
  </code></pre>
  
  <p>if newfile is empty (PartialBackups File) i want to exit the script, if not i want the script to continue</p>
  
  <p>how can i do that?</p>