while getopts ':ht:' option; do
case "$option" in
- h) echo "$USAGE"
- exit
- ;;
- t) TIMESPAN=$OPTARG
- ;;
- :) printf "missing argument for -%s\n" "$OPTARG" >&2
- echo "$usage" >&2
- exit 1
- ;;
- \?) printf "illegal option: -%s\n" "$OPTARG" >&2
- echo "$usage" >&2
- exit 1
- ;;
+ h) echo "$USAGE"
+ exit
+ ;;
+ t) TIMESPAN=$OPTARG
+ ;;
+ :) printf "missing argument for -%s\n" "$OPTARG" >&2
+ echo "$usage" >&2
+ exit 1
+ ;;
+ \?) printf "illegal option: -%s\n" "$OPTARG" >&2
+ echo "$usage" >&2
+ exit 1
+ ;;
esac
done
shift $((OPTIND - 1))
source $CONFIG
-URL="https://$HOST/export_data.csv?\
+URL="http://$HOST/export_data.csv?\
currency=$CURRENCY&\
data_type=price&\
exchange=$EXCHANGE&\