嗨,我有一个 bash 脚本:
#!/bin/bash
declare -a list1
declare -a list2
list1=("Hello" "there" "honey")
list2=("More" "strings" "here")
declare -a joined
joined=($(./pytest.py ${list1[@]} ${list2[@]}))
echo ${joined[@]}
以下是python代码pytest.py
:
#!/usr/bin/python
import sys
for i in sys.argv:
print "hi"
我得到的错误是这样的:
./pybash.sh: line 11: ./pytest.py: Permission denied
我使用以下内容来设置 shell 脚本的权限:
chmod +x pybash.sh
它仍然给我同样的错误。我究竟做错了什么?