Grep: Difference between revisions

Content added Content deleted
m (Protected "Grep" ([Edit=Allow only logged in users] (indefinite) [Move=Allow only logged in users] (indefinite) [Delete=Allow only logged in users] (indefinite)))
Line 67: Line 67:
|-
|-
| Search for "virus" in all files in a dir || grep virus /etc/snort/rules/*
| Search for "virus" in all files in a dir || grep virus /etc/snort/rules/*
|-
| Search this or that using Extended Regex || <nowiki>grep -E '(then|there)' demo_text</nowiki>
|-
| Search this or that without Extended Regex || <nowiki>grep '\(then\|there\)' demo_text</nowiki>
|-
| Search this or that grouping not necessary || <nowiki>grep 'then\|there' demo_text</nowiki>
|-
| Search this or that grouping required || <nowiki>grep 'the\(n\|re\)' demo_text</nowiki>
|}
|}
<br />
<br />