Merging info

Hi, pls advise how could we merge contents of lines from 2 different files into 1 file but shares common label continously as in the following example:
Thanks in advance...rgds.

File1:
// line: 0
abc
def
// line: 1
ghi
jkl

File2:
// line: 0
mno
pqr
// line: 1
stu
vwx

End result expected: File3
// line: 0
abc
def
mno
pqr

// line: 1
ghi
jkl
stu
vwx

cp $f1 $tmpf1 #make temp files
cp $f2 $tmpf2 #make temp files
no_list=$(awk '{print $3}' $tmpf1 $tmpf2 |sed '/^$/d'|sort -un)
last_no=$(awk '{print $3}' $tmpf1 $tmpf2 |sed '/^$/d'|sort -un|tail -1)
((last_no=last_no+1))
echo "line: $last_no" >>$tmpf1
echo "line: $last_no" >>$tmpf2
for i in $no_list
do
((nxt=i+1))
print "// line: $i"
sed -n '/line: '$i'/,/line: '$nxt'/p' $tmpf1 $tmpf2|grep -v line
done
rm $tmpf1 $tmpf2 #remove the temp files

Hi thanks.

But, on unix csh script, the $(awk is giving Illegal variable name...

Try back quotes instead of $(...). I am not sure of the syntax for csh. Someone familiar with csh could help.