Compare columns and rows with template, and fill empty slots.

Hi,
I'm working on a script that will take the contents of a file, that is in a row and column format, and compare it to a arrangment file. Such that if there is any or all blanks in my content file, the blank will be filled with a flag and will retain the row and column configuration.

Ex.

Content file is as follows,

100.000   200.000
123.423      4.354
  45.452    34.345
123.765   

Arrangment file is as follows,

***.***   ***.***
***.***    ***.***
***.***   ***.***
***.***   ***.***
***.***   ***.***

So we have an arrangement of 5 rows and 2 columns. And where the Content file doesn't match the Arrangement file I would like it to be displayed as.

100.000   200.000
123.423      4.354
  45.452    34.345
123.765   EMTPY
EMPTY     EMPTY

SO far I've been able to do

nl Arrangement_file > numbered_arrangement_file

But I can't get the Contents_file to have a beginning column of the list of lines up to 5. It will only go up to the 4th, and stop because that how much content is in the file.

Thanks for any help in advance.

awk 'NR==FNR{arr[FNR]=$1"\t"$2;next}END{
 for(i=0;++i<=FNR;){
   split(arr,sp,"\t")
   print (sp[1]==""?"Empty":sp[1]),(sp[2]==""?"Empty":sp[2])
   }
    }' content_file arrangement_file

Use gawk, nawk or /usr/xpg4/bin/awk on Solaris:

awk 'NR == FNR { r[NR] = $0; next }
{ 
  split(r[FNR], t)
  for (i = 0; ++i <= NF;)
    $i = t ? t : "EMPTY"
  }1' content_file arrangement_file