I would like to execute hello.py using test.sh. However, it seems test.sh read hello.py as sh file.
error message
line 1: syntax error near unexpected token `'hello''
test.sh
#!/user/bin/ python (which python path)
ARRAY=(1 2 3 4)
for num in ${ARRAY[@]}; do
/artic/m-yasunaga/work/korin-3/src/example/hi.py
echo $num"th loop"
done
hello.py
print('hello')
When I changed print('hello') to echo hello, it worked perfectly.
How can I execute hello.py as python code? ( I use linux )