Dotfiles for my tiling window manager + terminal workflow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 lines
323 B

  1. price=$(curl -s "https://api.kraken.com/0/public/Ticker?pair=$1" | jq -r ".result.$1.b[0]")
  2. # echo $price
  3. if (( $(echo "$price < 10" | bc -l) )); then
  4. printf "%0.3f\n" "$price" | cut -c 3-
  5. # printf "%0.3f\n" "$price"
  6. elif (( $(echo "$price < 10000" | bc -l) )); then
  7. printf "%'0.0f\n" "$price" | sed 's/,//'
  8. fi