-
-
Save TomK32/3afbb1208ced01d761785e24e413c130 to your computer and use it in GitHub Desktop.
cli currency_convert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# seen on https://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know/answer/Jostein-Austvik-Jacobsen?__snids__=1567875257&__nsrc__=4 | |
# usage currency_convert 14.99 eur usd | |
# output 14.9900 EUR = 16.7019 USD | |
currency_convert() { | |
wget -qO- "http://finance.google.com/finance/converter?a=$1&from=$2&to=$3" | sed '/res/!d;s/<[^>]*>//g'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment