1
无法解释为什么会发生这种情况。这里的脚本:基本bash脚本返回“无效语法”
#!/bin/bash
echo "Hello World"
这里的终端输出:
$ python ./test.sh
File "./tellapart_mac_setup.sh", line 2
echo "Hello World"
^
SyntaxError: invalid syntax
$ echo "hello world"
hello world
$ which 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.