2
0
Fork 0
mirror of https://github.com/alexanderepstein/Bash-Snippets synced 2018-11-08 02:59:35 +01:00

Moving parenthesis for shellcheck

This commit is contained in:
Alex Epstein 2017-07-25 19:45:40 -04:00
parent 01e25f610a
commit b2afb4b4b2

View file

@ -64,7 +64,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 " " + ) | sed 's/-d+//g' ) ## format the inputs to use for the api. Added sed command to filter -d flag.
movie=$( (echo "$@" | tr " " + ) | sed 's/-d+//g' ) ## format the inputs to use for the api. Added sed command to filter -d flag.
export PYTHONIOENCODING=utf8 #necessary for python 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 | python -c "import sys, json; print json.load(sys.stdin)['Response']" 2> /dev/null)