title: Time out a curl command shell script centOS
body: <pre><code>checkServer(){
      response=$(curl --connect-timeout 10  --write-out %{http_code} --silent --output /dev/null localhost:8080/patuna/servicecheck)
  
      if [ "$response" = "200" ];
          then echo "`date --rfc-3339=seconds` -  Server is healthy, up and running"
          return 0
      else
          echo "`date --rfc-3339=seconds` -  Server is not healthy(response code - $response ), server is going to restrat"
          startTomcat
      fi
  }
  </code></pre>
  
  <p>Here i want to time out the curl command but it dose not work. in centos7 Shell scrit. what i simply needs to do is timeout the curl command
      ERROR code is curl: option --connect-timeout=: is unknown</p>