From 90dee42598e2efbcbcf19b36db6565d7dbe809fd Mon Sep 17 00:00:00 2001
From: sak2n21 <sak2n21@soton.ac.uk>
Date: Tue, 9 May 2023 23:57:17 +0800
Subject: [PATCH] (Commit Message) script file to grep data, store in sql and
 error handling

---
 data2.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/data2.sh b/data2.sh
index d409424..6d5306b 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')
-- 
GitLab