shell prog for double words

I need a shell programing script for "double words"

Available Data:

This is a shell script that is used to find the ten character words in the machine local
dictionary (/usr/dict/words) that are made up with two valid english words that are
five character long. This means that each of the two five letter words is found in the
dictionary, and when the two are concatenated, the resulting word is a valid English word.
(examples: black board blackboard, grape fruit grapefruit, water melon watermelon). Use
the time command to see how fast (or slow) your script is, and write your finding in the
file doublewords.txt and save it in your text subdirectory. You do not need to include all
the words you found, a short or partial list will be just fine.

Shell: Bourne Shell

Thank you