【发布时间】:2021-10-19 14:24:29
【问题描述】:
我看到了这个命令:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -
这有什么用? bash中的“-”是什么?
【问题讨论】:
-
它不被称为“在 bash 中”。就
bash而言,它只是传递给python命令的一个参数。 Python 解释为“从标准输入读取脚本”。 (阅读man python) -
不要与 Unicode 连字符或短划线字符混淆(请参阅jkorpela.fi/dashes.html)......这会彻底混淆
python......和你。
标签: bash