grep for a subject centos linux

Good morning folks. I am relatively new to unix and I am trying to search for a particular subject but I am getting everything but a subject against a mail log file. How do I search with grep to get only the contents of a subject like for example the subject is "sex tonight at 8". If I use grep and then use double quotes or single quotes I get nothing. If I use nothing then it returns everything. I am in the  /var/log directory please help.
Who is Participating?
Pepe2323Connect With a Mentor Commented:
i will use grep -w "sex tonight at 8" that way will look only for the exact words no more no less
You need to escape the double quotes - Try grep '\"eat tonight at 8\"'
already closed - another correct answer deleted.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.