Skip to content
Snippets Groups Projects
Commit 1648886b authored by hqo1e21's avatar hqo1e21
Browse files

first push testing

parent 1d63f2b6
Branches
No related tags found
Loading
data.sh 0 → 100755
#!/bin/bash
curl https://www.kitco.com/charts/livegold.html > gold.html
goldBID=$(cat gold.html | grep -E "sp-bid" | sed 's/[^.0-9]*//g')
goldASK=$(cat gold.html | grep -E "sp-ask" | sed 's/[^.0-9]*//g')
curl https://www.kitco.com/charts/livesilver.html > silver.html
silverBID=$(cat silver.html | grep -E "sp-bid" | sed 's/[^.0-9]*//g')
silverASK=$(cat silver.html | grep -E "sp-ask" | sed 's/[^.0-9]*//g')
curl https://www.kitco.com/charts/liveplatinum.html > platinum.html
platinumBID=$(cat platinum.html | grep -E "sp-bid" | sed 's/[^.0-9]*//g')
platinumASK=$(cat platinum.html | grep -E "sp-ask" | sed 's/[^.0-9]*//g')
date=$(date +%d-%m-%Y)
time=$(date "+%H-%M %p")
echo -e "gold Bid: $goldBID, silver Bid: $silverBID, platinum Bid: $platinumBID\ngold Ask: $goldASK, silver Ask: $silverASK, platinum Ask: $platinumASK, $date $time" >> data.txt
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment