20 Mar 14, 09:00AM
(This post was last modified: 20 Mar 14, 09:01AM by RandumKiwi.)
(20 Mar 14, 06:04AM)Mousikos Wrote: Hey so I pull my nicknameblacklist from somewhere but they have exceptions to clans that seem to cause trouble. Is there anyway to remove them with, say, a sed command?
Grep is perfect for this scenario: grep -viE '(PATTERN1|PATTERN2|PATTERN3)' FILE > OUTPUTFILE
-v = only show entries that don't match the text
-E = regular expression, allows you to search for multiple patterns as per my example above.
-i = case insensitive