- 论坛徽章:
- 307
|
grep 命令包括一个 --exclude 选项, 查看了一下帮助文档没有看懂. 哪位大神给解释下!
--exclude=file_pattern
skip files and directories matching FILE_PATTERN
- $ grep -rwi "notepad" --exclude="[MO]*"
- 1:MISC:4:Notepad
- 1:MISC:7:Notepad => Notepads
- 1:MISC:9:Notepad-Computers
- 1:MISC2:4:Notepad => Notepads
- 1:MISC2:7:Notepad => Notepads
- 1:Others/Contacts:4:David male 1978 "He hasn't notepad, but he has more money!"
- 1:electrical:5:Notepad
- 2:MISC:4:Notepad
- 2:MISC:7:Notepad => Notepads
- 2:MISC:9:Notepad-Computers
- 2:MISC2:4:Notepad => Notepads
- 2:MISC2:7:Notepad => Notepads
- 2:Others/Contacts:4:David male 1978 "He hasn't notepad, but he has more money!"
- 2:electrical:5:Notepad
- electrical:Notepad
- Others/Contacts:David male 1978 "He hasn't notepad, but he has more money!"
复制代码 好像 --exclude="[MO]*" 并未完全起作用, 请指点, 谢谢. |
|