title: Shell script to check if server was started
body: <p>I want to know if my Weblogic server has been started successfully. I get the following string in server_run.log file which shows that server has been started.</p>
  
  <pre><code>&lt;20.8.2018 23:25:57 EEST&gt; &lt;Notice&gt; &lt;WebLogicServer&gt;&lt;Server started in RUNNING mode&gt;
  </code></pre>
  
  <p>When checking this manually I use following command which tells me that the following string just came in server_run.log file which means server has been started.</p>
  
  <pre><code>tail -100f server_run.log | grep 'Server started in RUNNING mode'
  </code></pre>
  
  <p>But I am not able create some if statement using the above command in my shell script. Something like</p>
  
  <pre><code>if[tail -100f server_run.log | grep 'Server started in RUNNING mode' ==1 ]
  </code></pre>