mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-05-09 09:08:36 +00:00
Don't show decimals in bitcoin price
This commit is contained in:
parent
716f2d9ae6
commit
f79aba8572
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ BTC_DATA=$(curl https://api.coindesk.com/v1/bpi/currentprice.json 2>/dev/null ||
|
||||||
|
|
||||||
if [ "$BTC_DATA" != "ERR" ]; then
|
if [ "$BTC_DATA" != "ERR" ]; then
|
||||||
BTC_PRICE=$(echo $BTC_DATA | jq -r ".bpi.USD.rate_float")
|
BTC_PRICE=$(echo $BTC_DATA | jq -r ".bpi.USD.rate_float")
|
||||||
BTC_PRICE=$(printf "%.2f" "$BTC_PRICE")
|
BTC_PRICE=$(printf "%.0f" "$BTC_PRICE")
|
||||||
echo \$"$BTC_PRICE"
|
echo \$"$BTC_PRICE"
|
||||||
else
|
else
|
||||||
echo "N/A"
|
echo "N/A"
|
||||||
|
|
Loading…
Add table
Reference in a new issue