From caa38d6f5b8ed521e5961bdbf17dbcaee2dcadac Mon Sep 17 00:00:00 2001 From: Nathan Daly Date: Thu, 20 Aug 2020 19:36:39 -0500 Subject: [PATCH] truly proper handling of IGetCurrencies.json --- tf2prices.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tf2prices.sh b/tf2prices.sh index 9733b22..a215522 100755 --- a/tf2prices.sh +++ b/tf2prices.sh @@ -7,9 +7,9 @@ apikey='' curl -sX GET "https://backpack.tf/api/IGetCurrencies/v1?raw=0&key=$apikey" -H "accept: application/json" > $HOME/IGetCurrencies.json #get prices -ref=$(cat ./IGetCurrencies.json |jq '.response.currencies.metal.price.value') -key=$(cat ./IGetCurrencies.json |jq '.response.currencies.keys.price.value') -bud=$(cat ./IGetCurrencies.json |jq '.response.currencies.earbuds.price.value') +ref=$(cat $HOME/IGetCurrencies.json |jq '.response.currencies.metal.price.value') +key=$(cat $HOME/IGetCurrencies.json |jq '.response.currencies.keys.price.value') +bud=$(cat $HOME/IGetCurrencies.json |jq '.response.currencies.earbuds.price.value') #print prices and nice text echo "Ref: $ref Keys: $key Buds: $bud"