Help with awk in array in while loop

Hi everyone:)
I have 2 files - IN & OUT. Example:

IN
A:13:30
B:45:40
.
.
. UNLIMITED

OUT
Z:12:24
Y:20:15
.
.
. UNLIMITED

I want first row of numbers of IN - OUT. Example 13-12 45-20
My code is

#!/bin/csh -f
set y=1
while ( $y<UNLIMITED )
set in = `awk -F':' '{print $2}' IN |awk '{array[NR]=$0} END {print array[y];}'`
set out = `awk -F':' '{print $2}' OUT |awk '{array[NR]=$0} END {print array[y];}'`
set number = `expr $in - $out`
echo "$number"
@ y = $y + 1
end

expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
expr: syntax error
all is expr: syntax error
I tried to solve more than one day already.:confused: And also duno wat should i write instead of UNLIMITED.
Anyone can help me?

As a starting point, you may want to review the following, http://www.unix.com/shell-programming-scripting/105029-awk-program-3.html#post302298986

Files are read into a two-dimensional array and then processed for printing.

The original query was to extract the 5th column from multiple files and print them out in columnar format.

Please put code inside

 tags.


 
#!/bin/csh -f

[/quote]
csh is not recommended for scripting.

[indent]Top Ten Reasons not to use the C shell
Csh problems
Csh Programming Considered Harmful

cut -d: -f2 in > in.tmp
cut -d: -f2 out > out.tmp
paste -d- in.tmp out.tmp
rm in.tmp out.tmp