merge files with same row values

Hi everyone,

I'm just wondering how could I using awk language merge two files by comparison of one their row.
I mean, I have one file like this:

file#1:

21/07/2009 11:45:00 100.0000000 27.2727280
21/07/2009 11:50:00 75.9856644 25.2492676
21/07/2009 11:55:00 51.9713287 23.2258072
21/07/2009 12:00:00 27.9569893 21.2023468
21/07/2009 12:05:00 27.9244041 21.5249271

and

file#2:
27/01/2009 11:00:00 1008
27/01/2009 12:00:00 1008
27/01/2009 13:00:00 1008
27/01/2009 14:00:00 1008
27/01/2009 15:00:00 1009
27/01/2009 16:00:00 1009
27/01/2009 17:00:00 1010
27/01/2009 18:00:00 1010

And finally I would like that the final output would be the merge of two file when the fields $1 and $2 were equal between both.

Thanks in advance.

Toni

Check join command

nawk '{idx=$1 SUBSEP $2} FNR==NR{f2[idx]=$3;next} {print $0 (idx in f2)? OFS f2[idx]:""}' file2 file1

join can't join on multiple fields.
@tonet try this:

awk 'NR==FNR{for (i=3;i<=NF;i++){a[$1$2]=a[$1$2]" "$i}next}$1$2 in a{print $0a[$1$2]}' file1 file2

Files can be specified in any order.

bartus11, thanks a lot for your response. It works perfectly.:b: