V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
raw0xff
V2EX  ›  Linux

grep 默认区分大小写吗?

  •  
  •   raw0xff · 316 天前 · 1235 次点击
    这是一个创建于 316 天前的主题,其中的信息可能已经有所发展或是发生改变。

    亲测默认是区分的

      -i
      	--ignore-case         ignore case distinctions in patterns and data
      	--no-ignore-case      do not ignore case distinctions (default)
    

    https://juejin.cn/s/grep%E4%B8%8D%E5%8C%BA%E5%88%86%E5%A4%A7%E5%B0%8F%E5%86%99 但是怎么会有这种文章,说的还有板有眼的。是不同发行版默认不同吗?

    14 条回复    2023-06-20 11:39:32 +08:00
    ho121
        1
    ho121  
       316 天前
    AI 生成的?
    raw0xff
        2
    raw0xff  
    OP
       316 天前
    @ho121 细思极恐啊
    vitovan
        3
    vitovan  
       316 天前
    > 但是,您可以通过使用 -i 选项来强制 grep 区分大小写。

    这过分了吧……

    man grep:

    -i, --ignore-case
    Perform case insensitive matching. By default, grep is case sensitive.
    vitovan
        4
    vitovan  
       316 天前
    请问上面的链接是哪来的呢?也没看见作者名字。
    oldsix2
        5
    oldsix2  
       316 天前
    看到过几次类似这种的文章了。很像 AI 生成的,一本正经的胡说八道
    laoyutang
        6
    laoyutang  
       316 天前 via Android
    现在网上挺多这样,一本正经的胡说八道,然后 bingai 给的答案就偏了,很离谱
    leaflxh
        7
    leaflxh  
       316 天前
    I want you to answer me with Chinese.

    用英文写的回答 xxxxx

    Is that Chinese?

    Yes! Its Chinese.

    No, that is not Chinese.

    Sorry if i made any mistakes xxxxxx.

    ---

    现阶段还是会一本正经的胡说八道
    raw0xff
        8
    raw0xff  
    OP
       316 天前
    搞这些的人是故意的反社会吗?过分
    raw0xff
        9
    raw0xff  
    OP
       316 天前
    @leaflxh 试试用 in chinese
    Andim
        10
    Andim  
       316 天前
    我 google 搜索好像把掘金给屏蔽了,我一直以为他是 内容农场 类型的网站
    nkidgm
        11
    nkidgm  
       316 天前
    我擦,擦点被 AI 弄凌乱了。

    -i 就是 ignore ,忽略大小写。

    平时不加 i 选项,那默认就区分大小写。
    proxychains
        12
    proxychains  
       316 天前
    做这种有误导性文章的产品经理我只希望他早日拿到火化证🙏🙏🙏
    raw0xff
        13
    raw0xff  
    OP
       316 天前
    @proxychains 我以为我眼花了,20 分钟前刚装了 proxychains ,正在折腾
    YouYouSmile
        14
    YouYouSmile  
       312 天前
    由于 linux 默认区分大小写,所以我个人默认 Linux 上所有的工具都区分大小写哈哈
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3394 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 00:50 · PVG 08:50 · LAX 17:50 · JFK 20:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.