I gave an example of how you COULD code it. You take that information and read about each command in the manual to see what each does to get a better understanding of what your trying to do.
And egghead, fuc|< you. You need to learn how to talk to people with respect, son.