GREPing AOL search records

kill AOLI just downloaded the AOL ’s release of the search queries for a half million users from the mirrors and I wanted to see if any of the sites I maintain are listed in it. So then I went to the command line and tried grep. I am big newbie to grep, so I had to read the man file.

From what I figured these work. There may be better solutions.

in it’s simplest: replace pattern with the word you are looking for, and file with the file name you want to grep. It then creates a file in your current directory called resultfile.txt.
grep -i pattern file > resultfile.txt

to search for lines that contain multiple words: (repeat the “| grep pattern” for each word)
grep -i pattern1 file | grep pattern2 > resultfile.txt

to search for lines that have pattern1 and exclude lines that have pattern2
grep -i pattern1 file | grep -v pattern2 > resultfile.txt

Maybe you know grep better, but I thought this would be a fun topic for you to try. Let me know what you find and if you have any better ways to grep thru this data.