Initial commit

This commit is contained in:
ItsDrike 2022-10-29 20:25:42 +02:00
parent b912871070
commit a3e01caebf
No known key found for this signature in database
GPG key ID: B014E761034AF742
157 changed files with 9696 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#!/bin/sh
BTC_DATA=$(curl https://api.coindesk.com/v1/bpi/currentprice.json 2>/dev/null || echo 'ERR')
if [ "$BTC_DATA" != "ERR" ]; then
BTC_PRICE=$(echo $BTC_DATA | jq -r ".bpi.USD.rate_float")
BTC_PRICE=$(printf "%.0f" "$BTC_PRICE")
echo \$"$BTC_PRICE"
else
echo "N/A"
fi