I have a webservice provided at http://localhost/test/testweb
http://localhost/test/testweb
I want to write a script to check if webservice is up with curl
If there a curl parame
Same as @burhan-khalid, but added --connect-timeout 3 and --max-time 5.
--connect-timeout 3
--max-time 5
test_command='curl -sL \ -w "%{http_code}\\n" \ "http://www.google.com:8080/" \ -o /dev/null \ --connect-timeout 3 \ --max-time 5' if [ $(test_command) == "200" ] ; then echo "OK" ; else echo "KO" ; fi