title: How do I use a file grep comparison inside a bash if/else statement?
body: <p>When our server comes up we need to check a file to see how the server is configured.  </p>
  
  <p>We want to search for the following string inside our /etc/aws/hosts.conf file: </p>
  
  <pre><code>MYSQL_ROLE=master
  </code></pre>
  
  <p>Then, we want to test whether that string exists and use an if/else statement to run one of two options depending on whether the string exists or not.  </p>
  
  <p>What is the BASH syntax for the if statement? </p>
  
  <pre><code>if [ ????? ]; then
    #do one thing
  else
    #do another thing
  fi
  </code></pre>