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:
parent
01e25f610a
commit
b2afb4b4b2
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue