无效的命令名'';运行bash脚本时

无效的命令名'';运行bash脚本时,bash,Bash,在bash脚本中运行以下操作时: python setup.py build_ext \ --include-dirs=/root/deps/include:/root/deps/include/flint \ --library-dirs=/root/deps/lib:/root/deps/lib/flint 我收到以下输出: invalid command name ' ' 老实说,我无法解释这个输出。我以前没见过,命令看起来很正确。是什么原因造成的?确保这些\字符是行

在bash脚本中运行以下操作时:

python setup.py build_ext \ 
    --include-dirs=/root/deps/include:/root/deps/include/flint \
    --library-dirs=/root/deps/lib:/root/deps/lib/flint
我收到以下输出:

invalid command name ' '

老实说,我无法解释这个输出。我以前没见过,命令看起来很正确。是什么原因造成的?

确保这些
\
字符是行中的最后一个字符-看起来它们后面可能有空格

例如,在第一种情况下,我在
\
后面加了一个空格,但在第二种情况下没有加空格:

pax> python \ 
python: can't open file ' ': [Errno 2] No such file or directory

pax> python \
...> nofile.py
python: can't open file 'nofile.py': [Errno 2] No such file or directory

忽略这一事实,它们都会生成相同类型的错误,我不会为第二种情况创建Python脚本。重要的是,
\
不被视为行延续字符,因此该行被视为完整。

确保这些
\
字符是行中的最后一个字符-看起来它们后面可能有空格

例如,在第一种情况下,我在
\
后面加了一个空格,但在第二种情况下没有加空格:

pax> python \ 
python: can't open file ' ': [Errno 2] No such file or directory

pax> python \
...> nofile.py
python: can't open file 'nofile.py': [Errno 2] No such file or directory
忽略这一事实,它们都会生成相同类型的错误,我不会为第二种情况创建Python脚本。重要的是,
\
不被视为行延续字符,因此该行被认为是完整的。

提示:检测此问题和其他常见bash问题提示:检测此问题和其他常见bash问题