title: how to perform operation after successfully starting elastic search
body: <p>I have to create a shell script to start elastic search from shell command and after successful start of elastic search I have to perform certain operation.
  In my case elastic search is starts but after that nothing happens not even echo command works.</p>
  
  <p>Here is the code sample :</p>
  
  <pre><code>elasticsearch-1.7.2/bin/elasticsearch   
  
  res=$( curl -w %{http_code} -s --output /dev/null http://localhost:9200)
  if [ $res -eq 200 ]
  then 
          echo "Elastic search running successfully"  
          Perform operation
  fi
  </code></pre>
  
  <p>Thanks,</p>