gpt4 book ai didi

grep - 这个 grep 命令行中的数字 2 是什么意思?

转载 作者:行者123 更新时间:2023-12-01 11:38:09 25 4
gpt4 key购买 nike

grep -2riP

我在命令行 fu 上看到了它。我查看了手册页,但找不到,可能是我错过了。

最佳答案

来自 grep 手册页:

-C NUM, -NUM, --context=NUM Print NUM lines of output context. Places a line containing a group separator (described under --group-separator) between contiguous groups of matches. With the -o or --only-matching option, this has no effect and a warning is given.

因此,grep -2 等同于 grep -C 2,它告诉 grep 在匹配前后显示 2 行。

关于grep - 这个 grep 命令行中的数字 2 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25236644/

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