title: Execute Shell script after other script got executed successfully
body: <p><strong>Problem Statement:-</strong></p>
  
  <p>I have four shell script that I want to execute only when the previous script got executed successfully. And I am running it like this currently-</p>
  
  <pre><code>./verify-export-realtime.sh
  
  sh -x lca_query.sh
  
  sh -x liv_query.sh
  
  sh -x lqu_query.sh
  </code></pre>
  
  <p>So In order to make other scripts run after previous script was successful. I need to do something like below? I am not sure whether I am right? If any script got failed due to any reason it will print as <strong>Failed due to some reason</strong>  right?</p>
  
  <pre><code>./verify-export-realtime.sh
  
  RET_VAL_STATUS=$?
  echo $RET_VAL_STATUS
  if [ $RET_VAL_STATUS -ne 0 ]; then
  echo "Failed due to some reason"
  exit
  fi
  
  sh -x lca_query.sh
  
  RET_VAL_STATUS=$?
  echo $RET_VAL_STATUS
  if [ $RET_VAL_STATUS -ne 0 ]; then
  echo "Failed due to some reason"
  exit
  fi
  
  sh -x liv_query.sh
  
  RET_VAL_STATUS=$?
  echo $RET_VAL_STATUS
  if [ $RET_VAL_STATUS -ne 0 ]; then
  echo "Failed due to some reason"
  exit
  fi
  
  
  sh -x lqu_query.sh
  </code></pre>