Created
February 19, 2016 09:34
-
-
Save hasantayyar/f4b581dcf5773685092b 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://www.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