我想检查文件中的字符串,无论其大小写如何。
刺痛是:
env=electron
如果文件 shell.txt 包含任何形式的给定字符串,无论大小写,都必须显示匹配
示例 shell.txt
Electron
electron
ELECTRON
ElEcTRon /* upper lower combination in any order have to chow matching */
我该怎么做?
最佳答案
grep -i "electron" shell.txt
-i 表示忽略大小写..
关于linux - 使用 shell 脚本检查文件中给定的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10071062/