Comments (7)
Can you try doing a manual git install of bash snippets without checking out to the latest stable release? Steps for this process are in the readme and just skip the step with the command git checkout
. There have been some changes to the currency script and I want to see if the error still occurs on the latest version. Doing the above process will get you the latest unreleased changes of bash-snippets.
If that does not work can you try running the command bash -x currency EUR USD 12.35
and paste the output here?
from bash-snippets.
can you try running the command
bash -x currency EUR USD 12.35
and paste the output here?
before manual git install, bash -x currency EUR USD 12.35 gives me:
bash -x currency EUR USD 12.35
+ unset base
+ unset exchangeTo
+ currentVersion=1.22.1
+ unset configuredClient
+ currencyCodes=(AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HRK HUF IDR ILS INR JPY KRW MXN MYR NOK NZD PHP PLN RON RUB SEK SGD THB TRY USD ZAR)
+ getConfiguredClient
+ command -v curl
+ configuredClient=curl
+ getopts uvh opt
+ [[ 3 == 0 ]]
+ [[ 3 == \1 ]]
+ [[ 3 == \2 ]]
+ [[ 3 == \3 ]]
+ checkInternet
+ httpGet github.com
+ checkBase EUR
+ base=EUR
++ echo EUR
++ tr /a-z/ /A-Z/
+ base=EUR
++ checkValidCurrency EUR
+++ echo EUR
+++ tr -d '[:space:]'
++ [[ AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HRK HUF IDR ILS INR JPY KRW MXN MYR NOK NZD PHP PLN RON RUB SEK SGD THB TRY USD ZAR == *\E\U\R* ]]
++ echo 0
+ [[ 0 == \1 ]]
+ checkExchangeTo USD
+ exchangeTo=USD
++ echo USD
++ tr /a-z/ /A-Z/
+ exchangeTo=USD
++ checkValidCurrency USD
+++ echo USD
+++ tr -d '[:space:]'
++ [[ AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HRK HUF IDR ILS INR JPY KRW MXN MYR NOK NZD PHP PLN RON RUB SEK SGD THB TRY USD ZAR == *\U\S\D* ]]
++ echo 0
+ [[ 0 == \1 ]]
+ checkAmount 12.35
+ amount=12.35
+ [[ ! 12.35 =~ ^[0-9]+(\.[0-9]+)?$ ]]
+ convertCurrency
++ httpGet 'https://api.exchangeratesapi.io/latest?base=EUR'
++ case "$configuredClient" in
++ curl -A curl -s 'https://api.exchangeratesapi.io/latest?base=EUR'
++ grep -Eo 'USD":[1-9.]*'
++ grep -Eo '[0-9.]*'
+ exchangeRate=
+ command -v bc
++ echo ' * 12.35'
++ bc
(standard_in) 1: parse error
+ exchangeAmount=
+ cat
=========================
| EUR to USD
| Rate:
| EUR: 12.35
| USD:
=========================
+ exit 0
from bash-snippets.
Can you try doing a manual git install of bash snippets without checking out to the latest stable release? Steps for this process are in the readme and just skip the step with the command
git checkout
. There have been some changes to the currency script and I want to see if the error still occurs on the latest version. Doing the above process will get you the latest unreleased changes of bash-snippets.
Did as advised, after manual git install error still occurs:
currency USD EUR 12.35
(standard_in) 1: parse error
=========================
| USD to EUR
| Rate:
| USD: 12.35
| EUR:
=========================
from bash-snippets.
after doing manual git install as advised, bash -x currency EUR USD 12.35 gives me:
bash -x currency EUR USD 12.35
+ unset base
+ unset exchangeTo
+ currentVersion=1.22.1
+ unset configuredClient
+ currencyCodes=(AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HRK HUF IDR ILS INR JPY KRW MXN MYR NOK NZD PHP PLN RON RUB SEK SGD THB TRY USD ZAR)
+ getConfiguredClient
+ command -v curl
+ configuredClient=curl
+ getopts uvh opt
+ [[ 3 == 0 ]]
+ [[ 3 == \1 ]]
+ [[ 3 == \2 ]]
+ [[ 3 == \3 ]]
+ checkInternet
+ httpGet github.com
+ checkBase EUR
+ base=EUR
++ echo EUR
++ tr /a-z/ /A-Z/
+ base=EUR
++ checkValidCurrency EUR
+++ echo EUR
+++ tr -d '[:space:]'
++ [[ AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HRK HUF IDR ILS INR JPY KRW MXN MYR NOK NZD PHP PLN RON RUB SEK SGD THB TRY USD ZAR == *\E\U\R* ]]
++ echo 0
+ [[ 0 == \1 ]]
+ checkExchangeTo USD
+ exchangeTo=USD
++ echo USD
++ tr /a-z/ /A-Z/
+ exchangeTo=USD
++ checkValidCurrency USD
+++ echo USD
+++ tr -d '[:space:]'
++ [[ AUD BGN BRL CAD CHF CNY CZK DKK EUR GBP HKD HRK HUF IDR ILS INR JPY KRW MXN MYR NOK NZD PHP PLN RON RUB SEK SGD THB TRY USD ZAR == *\U\S\D* ]]
++ echo 0
+ [[ 0 == \1 ]]
+ checkAmount 12.35
+ amount=12.35
+ [[ ! 12.35 =~ ^[0-9]+(\.[0-9]+)?$ ]]
+ convertCurrency
++ grep -Eo 'USD":[1-9.]*'
++ httpGet 'https://api.exchangeratesapi.io/latest?base=EUR'
++ case "$configuredClient" in
++ curl -A curl -s 'https://api.exchangeratesapi.io/latest?base=EUR'
++ grep -Eo '[0-9.]*'
+ exchangeRate=
+ command -v bc
++ echo ' * 12.35'
++ bc
(standard_in) 1: parse error
+ exchangeAmount=
+ cat
=========================
| EUR to USD
| Rate:
| EUR: 12.35
| USD:
=========================
+ exit 0
from bash-snippets.
It appears either that the API call is not working anymore, or they have changed the response format so we aren't parsing it correctly anymore. Will look into this
from bash-snippets.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from bash-snippets.
This issue has been automatically closed because it has been inactive for 30 days.
from bash-snippets.
Related Issues (20)
- Can't install one script by brew HOT 4
- Qrify file reading bug HOT 6
- stocks script not working HOT 3
- ytview not working on Mac - error message HOT 3
- Multiple Tests Broken HOT 3
- Stock script returns "Not a valid stock symbol" HOT 7
- Pwned no longer working HOT 4
- Lyrics script fails when it finds the lyrics HOT 13
- Can't use ytview HOT 4
- Package in the AUR HOT 2
- Newton result field empty HOT 1
- not valid stock symbol weird output HOT 2
- ytview doesnt work HOT 2
- Installing from source fails on MacOS
- Currency syntax error 1, the whole command doesn't work. HOT 2
- meme doesn't work
- transfer.sh domain is not working anymore instead.. HOT 4
- ytview doesn't work
- movies script returns empty variable values in results HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bash-snippets.