summaryrefslogtreecommitdiffstats
path: root/util/bin/currency.google
diff options
context:
space:
mode:
authorBuildTools <unconfigured@null.spigotmc.org>2015-02-18 19:14:19 +0100
committerBuildTools <unconfigured@null.spigotmc.org>2015-02-18 19:14:19 +0100
commitd082120dbed7d60249e195a1d4ba1af40ff48eff (patch)
treeba5ac950eec03e449bba3237114ffcb7027eb6aa /util/bin/currency.google
parentbb2dd4b5f16bec5bf7e91c5a4baa517c0ab3ecf9 (diff)
currency.google: fix usage
Diffstat (limited to 'util/bin/currency.google')
-rwxr-xr-xutil/bin/currency.google5
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/\[\[\[\"//' |