Skip to content
Snippets Groups Projects
Commit 90dee425 authored by sak2n21's avatar sak2n21
Browse files

(Commit Message) script file to grep data, store in sql and error handling

parent f200616a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/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 curl https://www.kitco.com/charts/livegold.html > data.html
goldbidprice=$(cat data.html | grep "sp-bid" | sed 's/[^$.0-9]*//g') goldbidprice=$(cat data.html | grep "sp-bid" | sed 's/[^$.0-9]*//g')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment