ikari-pl
12/12/2014 - 4:57 PM

Any currency to PLN (hardcoded one) command line converter

Any currency to PLN (hardcoded one) command line converter

ileto() {
  curl -s -L "http://www.google.com/finance/converter?a=$1&from=$2&to=pln&hl=pl" | sed '/res/!d;s/<[^>]*>//g'
}
alias iletokurwa=ileto

# examples:
# ⇒ ileto 100 usd
# 100 USD = 335.4000 PLN
#
# ⇒ iletokurwa 100 eur
# 100 EUR = 418.5300 PLN