Basic bash script returns "invalid syntax" -


can't explain why happening. here's script:

#!/bin/bash echo "hello world" 

here's terminal output:

$ python ./test.sh      file "./tellapart_mac_setup.sh", line 2         echo "hello world"         ^ syntaxerror: invalid syntax  $ echo "hello world" hello world  $ bash /bin/bash  $ /bin/bash --version gnu bash, version 3.2.57(1)-release (x86_64-apple-darwin14) copyright (c) 2007 free software foundation, inc. 

looks you're parsing python, since it's not python script - of course throw errors in python's compiler.

it's bash script, use bash process it:

./test.sh 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -