I strongly suggest learning basic awk. There are plenty of resources and examples online. Please give it a try so you can be self sufficient over the long term. Based on your question it looks like you just want someone to write the script for you.
This is just my personal opinion but I think people should make a reasonable attempt at the script before posting a question about it.