Jump to content

Johann

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Hi @Shahriar Shovon Great, thanks. I will try thins and revert back if I have more questions. Much appreciated.
  2. I'm trying to monitor a website using curl but the output doesn't seem to work, please see commands below: #!/bin/bash varDate=$(date '+%Y-%m-%d %H:%M:%S') varCurlError=$(curl -sSf https://website.com > /dev/null) varHttpCode=$(curl -Is https://website.com | head -n 1) varResponseTime=$(curl -s -w '%{time_total}' -o /dev/null website.com) varOutput="$varDate | $varCurlError | $varHttpCode | $varResponseTime" echo $varOutput The output looks like this : | 0.07323 18:51:40 | | HTTP/1.1 200 OK What can I change or add to fix the output. Much appreciated.
×
×
  • Create New...