擅长:python、mysql、java
<p>好问题。对我来说,一切正常。您应该总是引用经过计算的变量(<code>"$X"</code>而不是<code>$X</code>);也许这可以修复您的错误。在</p>
<p>但我建议使用python脚本的结果而不是其输出:</p>
<pre><code>#!/bin/bash
if python -c 'import sys; sys.exit(1 if sys.hexversion<0x03000000 else 0)'
then
echo "Fine!"
fi
</code></pre>
<p>{like to stay in the shell,If you can use the follow in the shell},If you can use the follow in the shell}如果你想完全留在shell中,也可以使用</p>
^{pr2}$
<p>也许这更具可读性。在</p>