grep 默认区分大小写吗?

2023 年 6 月 16 日
 raw0xff

亲测默认是区分的

  -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 但是怎么会有这种文章,说的还有板有眼的。是不同发行版默认不同吗?

2226 次点击
所在节点    Linux
14 条回复
ho121
2023 年 6 月 16 日
AI 生成的?
raw0xff
2023 年 6 月 16 日
@ho121 细思极恐啊
vitovan
2023 年 6 月 16 日
> 但是,您可以通过使用 -i 选项来强制 grep 区分大小写。

这过分了吧……

man grep:

-i, --ignore-case
Perform case insensitive matching. By default, grep is case sensitive.
vitovan
2023 年 6 月 16 日
请问上面的链接是哪来的呢?也没看见作者名字。
oldsix2
2023 年 6 月 16 日
看到过几次类似这种的文章了。很像 AI 生成的,一本正经的胡说八道
laoyutang
2023 年 6 月 16 日
现在网上挺多这样,一本正经的胡说八道,然后 bingai 给的答案就偏了,很离谱
leaflxh
2023 年 6 月 16 日
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
2023 年 6 月 16 日
搞这些的人是故意的反社会吗?过分
raw0xff
2023 年 6 月 16 日
@leaflxh 试试用 in chinese
Andim
2023 年 6 月 16 日
我 google 搜索好像把掘金给屏蔽了,我一直以为他是 内容农场 类型的网站
nkidgm
2023 年 6 月 16 日
我擦,擦点被 AI 弄凌乱了。

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

平时不加 i 选项,那默认就区分大小写。
proxychains
2023 年 6 月 16 日
做这种有误导性文章的产品经理我只希望他早日拿到火化证🙏🙏🙏
raw0xff
2023 年 6 月 16 日
@proxychains 我以为我眼花了,20 分钟前刚装了 proxychains ,正在折腾
YouYouSmile
2023 年 6 月 20 日
由于 linux 默认区分大小写,所以我个人默认 Linux 上所有的工具都区分大小写哈哈

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/949294

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX