gpt4 book ai didi

regex - grep 没有按预期运行

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:26:37 25 4
gpt4 key购买 nike

为什么

lsmod |grep --color=auto pcs*

还匹配pcgss吗?

enter image description here

最佳答案

因为 s* 告诉 grep 匹配 s 零次 或更多次。您似乎混淆了正则表达式和文件搜索模式。如果您只需要输出带有 pcs + 内容的行,只需使用 pcs 作为正则表达式模式:

lsmod |grep --color=auto pcs

关于regex - grep 没有按预期运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44238095/

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