comparing values

i have two file and i am comparing both..
in cmp1 ,the content is :
the nu of file is : <some integer value>

in cmp2 ,the content is :
the nu of file is :

so want a script which will take value (2) when cmp1 is compared with cmp2..
i mean cmp cmp1 cmp2 the the output will be
he nu of file is : <some integer value>

i need help .thanks in advance

Your description is unclear to me. Provide example of what you need.