gpt4 book ai didi

bash - shell命令含义(反斜杠和grep)

转载 作者:行者123 更新时间:2023-11-29 09:36:41 26 4
gpt4 key购买 nike

我将 |(bar) 误输入为\(反斜杠)

locate abcdef \ grep 2

像这样。然后 bash 开始查找名称中包含“2”的所有文件。
为什么会这样?

最佳答案

你的命令:

locate abcdef \ grep 2

locate 之后制作其余文本,即 \grep 2 作为 locate 命令的参数,因此它开始处理 locate 命令(grep 根本没有执行)。

关于bash - shell命令含义(反斜杠和grep),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19560472/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com