I have been asked to write a shell script To check if a URL is UP/Working or not for my Project.I tried to find some hints over the internet, but whatever I got is about checking whether the URL exists or not.I first tried with wget.wget -S --spider https://genesis-dev.webbank.ssmb.com:21589/gop-ui/app.jsp 2>&1 | awk '/^  /'if [ $? -ne 0 ]then echo Server is UPelseecho Server is downfiMy next attempt was with curl.curl -ivs  https://genesis-dev.webbank.ssmb.com:21589/opconsole-sit/opconsole.html#if [ $? -ne 0 ]then echo Server is UPelseecho Server is downfiBut, both are checking existence of the URL not the response.
How to get a response from any URL?
shell;shell script;scripting;ksh