Ok well this isn't homework or classwork, I have been done with school for many years. I offered to help my co-worker who's daughter needs help. I didn't realize I had got rid of all of my UNIX books until after I agreed to help.
If you actually searched the forums, you would have found posts which describe the use of for loop.
Thats just a start. Modify it to suit your mood.
thanks ...
Your co-worker's daughter's homework is still homework. Thread closed.