diff --git a/data2.sh b/data2.sh index d40942415979883123cf6b03dc2809ad8d28b9e3..6d5306bbcbcec4f07d0bda84837e214f2f3ed43a 100755 --- a/data2.sh +++ b/data2.sh @@ -1,4 +1,10 @@ #!/bin/bash +if curl("https://www.kitco.com/charts/livegold.html > data.html" 2>&1 | grep -w "201|403|404|500|502|503") + +then +echo "https://www.kitco.com/charts/livegold.html is currently down" + +else curl https://www.kitco.com/charts/livegold.html > data.html goldbidprice=$(cat data.html | grep "sp-bid" | sed 's/[^$.0-9]*//g')