I've got a logfile full of lines with varying regular expressions, and I need to grep through the file, looking for specific patterns
this is part of a bash script that searches through an ircd spam filter log, showing various details - here's the lines I'm having trouble with:
pattern="^FREE .+ pics and movies (www.siteA.da.ru|wWw.siteB.oRg)$
grep -F "$pattern" spamfilter.log
spamfilter.log is filled with lines similar to this:
[Sun Jul 3 18:19:27 2005] - [Spamfilter] [|didosch|]!~wkngfhdvs@49f
doo.fr matches filter '^FREE .+ pics and movies (www\.siteA\.da\.ru|wWw\.s
$': [PRIVMSG DarkReal: 'FREE Porn pics and movies www.siteA.da.ru'
] [Spamming a porn url to users. Scan your pc for viruses.]
the various logfile lines have many different regex patterns, but that's an example of one of them
so, since what I want to search for is a regular expression, I can't use a regular expression to search for it easilly, so I use the -F switch to tell grep that it's a fixed string, but I can't get the correct results.. any ideas?