14,982
edits
| Line 102: | Line 102: | ||
** case insensitive<ref>[http://droptips.com/using-grep-and-ignoring-case-case-insensitive-grep Using grep and Ignoring Case (Case Insensitive grep)]</ref>: Using {{kbd | key=<nowiki>grep -i keyword /path/to/file</nowiki>}} ({{Linux}}) or enclose it in double quotes if the keywords contains spaces {{kbd | key=<nowiki>grep -i "keywords contains space" /path/to/file</nowiki>}} | ** case insensitive<ref>[http://droptips.com/using-grep-and-ignoring-case-case-insensitive-grep Using grep and Ignoring Case (Case Insensitive grep)]</ref>: Using {{kbd | key=<nowiki>grep -i keyword /path/to/file</nowiki>}} ({{Linux}}) or enclose it in double quotes if the keywords contains spaces {{kbd | key=<nowiki>grep -i "keywords contains space" /path/to/file</nowiki>}} | ||
** case sensitive: {{kbd | key=<nowiki>grep keyword /path/to/file</nowiki>}} ({{Linux}}) | ** case sensitive: {{kbd | key=<nowiki>grep keyword /path/to/file</nowiki>}} ({{Linux}}) | ||
** show several surrounding lines: {{kbd | key=<nowiki>grep -C 2 keyword /path/to/file</nowiki>}} to show 2 lines before and 2 lines after<ref>[https://stackoverflow.com/questions/9081/grep-a-file-but-show-several-surrounding-lines search - grep a file, but show several surrounding lines? - Stack Overflow]</ref>. ({{Linux}}) | |||
* vim: (1)[http://www.tuxfiles.org/linuxhelp/vimcheat.html vim] <nowiki>[options]</nowiki> ''filename'' (2)press {{kbd | key= /keyword}} ({{Linux}}) | * vim: (1)[http://www.tuxfiles.org/linuxhelp/vimcheat.html vim] <nowiki>[options]</nowiki> ''filename'' (2)press {{kbd | key= /keyword}} ({{Linux}}) | ||