来自 env 的手册页:
The historic - option has been deprecated but is still supported in this implementation.
“历史 - 选项”起什么作用?
具体来说,为什么它会改变运行的 python 版本?
~:$ env python
Python 2.6.5 Stackless 3.1b3 060516 (release26-maint, Mar 24 2010, 09:47:07)
但:
~:$ env - python
Python 2.5.1 (r251:54863, Feb 6 2009, 19:02:12)
答案1
“历史性”?这是新的。以下是 GNU coreutils 7.6 手册页的摘录env(1)
:
-i, --ignore-environment start with an empty environment
....
A mere - implies -i. If no COMMAND, print the resulting environment.
不传递任何命令,看看是否有变化$PATH
。