title: Check if file exists and whether it contains a specific string
body: <p>I want to check if <code>file2.sh</code> exists and also if a specific word, <code>poet</code> is part of the file. I use <code>grep</code> to create the variable <code>used_var</code>.</p>
  
  <pre><code>#!/bin/ksh
  
  file_name=/home/file2.sh                  
  used_var=`grep "poet" $file_name`    
  </code></pre>
  
  <p>How can I check if <code>used_var</code> has some value?</p>