title: awk command for searching multiple patterns
body: <p>I have a log file which keeps on updating.
  there is a function for updating the file.
  Upon successful operation function inserts "status 0" in log file else status 1.
  What i am looking for is -
  I want to write a monitoring script which will open this log file and will search for today's date AND status code.</p>
  
  <p>Please note -
  there is no such date wise separation. Logs of yesterday and today's are stored in same file.</p>
  
  <p>below is a sample code i tried but i want to search for today's date as well-</p>
  
  <pre><code>current_date=`date +%d-%b-%y`
  echo $current_date
  cd /complete/application/logs
  
  status=`tail -10 agent.log | awk '/"$current_date"/&amp;&amp;/Agent Exited/ {print $0}'`
  echo $status
  if [ "$status" == "&lt;0&gt;" ]
  then
  echo "Log Agent Status on `hostname` is running fine."
  else
  echo "Log Agent status on `hostname` is not running ."
  fi
  </code></pre>
  
  <p>Please advise.</p>