当文件第一行是这个的时候
#!/user/bin/env python3
在command执行后结果如下 -> chmod a+x hello.py -> ./hello.py -bash: ./hello.py: /user/bin/env: bad interpreter: No such file or directory
后来修改第一行
#!/bin/sh
在command执行结果如下 -> chmod a+x hello.py -> ./hello.py ./hello.py: line 3: syntax error near unexpected token 'hello world'' ./hello.py: line 3:print('hello world')'
'hello world'' ./hello.py: line 3:
我想这个是不是跟bash文件有关系啊?求指教,谢谢!
是 usr 不是 user
啊...好低级的错误啊,谢谢...
Sign in to make a reply
小O_园子
当文件第一行是这个的时候
在command执行后结果如下 -> chmod a+x hello.py -> ./hello.py -bash: ./hello.py: /user/bin/env: bad interpreter: No such file or directory
后来修改第一行
在command执行结果如下 -> chmod a+x hello.py -> ./hello.py ./hello.py: line 3: syntax error near unexpected token
'hello world'' ./hello.py: line 3:
print('hello world')'我想这个是不是跟bash文件有关系啊?求指教,谢谢!