alexanderepstein / Bash-Snippets

A collection of small bash scripts for heavy terminal users
MIT License
9.64k stars 842 forks source link

Currency syntax error 1, the whole command doesn't work. #232

Open jamieveenswijk opened 3 years ago

jamieveenswijk commented 3 years ago

Issue Label:

Description: When trying to convert currency with the "currency" command, the script gives a (standard_in) 1: syntax error.

If its a bug make sure to include this section.

OS and OS version:

OS Version: Ubuntu 20.04

image

moneypro commented 3 years ago

Running on MacOS Big Sur. Got parsing error. Looks like the API return value changed from the source.

hong@C02FN173MD6V server % currency USD EUR 540 (standard_in) 1: parse error (standard_in) 1: parse error (standard_in) 1: parse error | USD to EUR | Rate: | USD: 540 | EUR: hong@C02FN173MD6V server % currency USD CAD 540 (standard_in) 1: parse error (standard_in) 1: parse error (standard_in) 1: parse error | USD to CAD | Rate: | USD: 540 | CAD: hong@C02FN173MD6V server % currency What is the base currency: USD What currency to exchange to: CAD What is the amount being exchanged: 100 (standard_in) 1: parse error (standard_in) 1: parse error (standard_in) 1: parse error | USD to CAD | Rate: | USD: 100 | CAD:

jazz-it commented 2 years ago

You need to pull the following change in order to make it work: https://github.com/alexanderepstein/Bash-Snippets/commit/9f92e2ec04750aef8c3bf503befad89fb495a79d