diff --git a/movies/movies b/movies/movies index 236a469..ce4998b 100755 --- a/movies/movies +++ b/movies/movies @@ -47,7 +47,7 @@ checkInternet() getMovieInfo() { apiKey=946f500a # try not to abuse this it is a key that came from the ruby-scripts repo I link to. - movie=$(echo $@ | tr " " + ) ## format the inputs to use for the api + movie=$(echo "$@" | tr " " + ) ## format the inputs to use for the api export PYTHONIOENCODING=utf8 #necessary for python2 in some cases movieInfo=$(httpGet "http://www.omdbapi.com/?t=$movie&apikey=$apiKey") > /dev/null # query the server and get the JSON response checkResponse=$(echo $movieInfo | python2 -c "import sys, json; print json.load(sys.stdin)['Response']") @@ -167,6 +167,6 @@ elif [[ $1 == "update" ]];then elif [[ $1 == "help" ]];then usage else - getMovieInfo $@ || exit 1 ## exit if we return 1 (chances are movie was not found) + getMovieInfo "$@" || exit 1 ## exit if we return 1 (chances are movie was not found) printMovieInfo ## print out the data fi diff --git a/stocks/stocks b/stocks/stocks index 3c82be1..cde79a8 100755 --- a/stocks/stocks +++ b/stocks/stocks @@ -183,7 +183,7 @@ elif [[ $# == "0" ]];then usage exit 0 else - getTicker $@ # the company name might have spaces so passing in all args allows for this + getTicker "$@" # the company name might have spaces so passing in all args allows for this getStockInformation $symbol # based on the stock symbol exrapolated by the getTicker function get information on the stock printStockInformation # print this information out to the user in a human readable format exit 0 diff --git a/taste/taste b/taste/taste index 30bf8e5..bcad219 100755 --- a/taste/taste +++ b/taste/taste @@ -238,14 +238,14 @@ elif [[ $1 == "help" ]];then else if [[ $search == "0" ]];then if [[ $info == "0" ]];then - getSimilar $@ || exit 1 ## exit if we return 1 (chances are movie was not found) + getSimilar "$@" || exit 1 ## exit if we return 1 (chances are movie was not found) printResults else - getSimilar $@ || exit 1 + getSimilar "$@" || exit 1 printResults fi else - getInfo ${@:2} || exit 1 ## exit if we return 1 (chances are movie was not found) + getInfo "${@:2}" || exit 1 ## exit if we return 1 (chances are movie was not found) printInfo fi fi diff --git a/weather/weather b/weather/weather index e6510b4..dd33767 100755 --- a/weather/weather +++ b/weather/weather @@ -49,7 +49,7 @@ getIPWeather() getLocationWeather() { - args=$(echo $@ | tr " " + ) + args=$(echo "$@" | tr " " + ) httpGet $locale.wttr.in/${args} } @@ -159,5 +159,5 @@ elif [[ $1 == "m" ]]; then elif [[ $1 == "i" ]]; then getIPWeather "?u" else - getLocationWeather $@ + getLocationWeather "$@" fi