Ok, you should consider using gawk to get singel words and so on from the content. use egrep to search for 'and' in a file and then you can play a little with stuff like cat and so on. Check man for those commands and you will figure it out.
We can't do the homework for you.