diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/bin/currency.google | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/util/bin/currency.google b/util/bin/currency.google index 694f7cc2..8219a866 100755 --- a/util/bin/currency.google +++ b/util/bin/currency.google @@ -1,13 +1,12 @@ #! /bin/sh set -euf -amount=$1 tc=${TC:="usd"} sc=${SC:="eur"} usage(){ echo 'TC= targetcurrency, valid strings are in the style of "usd", "eur" or "sgd". default "usd"' - echo 'SC= sourcelanguage, same TC, default is eur' + echo 'SC= sourcecurrency, same TC, default is eur' echo 'Example: TC="sgd" ./currency.google 11' exit 0 @@ -15,7 +14,7 @@ usage(){ currency_convert(){ text=$* - url="http://www.google.com/finance/converter?a=$amount&from=$sc&to=$tc" + url="http://www.google.com/finance/converter?a=$1&from=$sc&to=$tc" curl -A "Mozilla/5.0" -Ss "$url" | sed '/res/!d;s/<[^>]*>//g' | #sed 's/\[\[\[\"//' | |