getPriceUsdArs.sh 343 B

12345678910
  1. #!/usr/bin/env bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. USD_PRICE=$(curl -s "https://mercados.ambito.com//dolar/informal/variacion" | jq '.venta' | tr -d '"' | sed 's:\,[^|]*::g')
  7. #curl -s "https://mercados.ambito.com//dolarturista/variacion" | jq '.venta' | tr -d '"' | sed 's:\,[^|]*::g'
  8. printf "%0.0f\n" "${USD_PRICE}"