I am trying to join two files with different rows but one element in common.
FILE1:
1/temperature
2/rainfall
3/snowfall
4/windspeed
5/winddirection
FILE2:
2008-10-01/1/68
2008-10-02/2/6
2008-10-03/3/4
2008-10-04/4/25
2008-10-05/5/120
2008-10-01/1/89
2008-10-01/4/35
2008-11-01/5/360
2008-10-01/1/45
2008-12-01/1/61
2008-10-10/1/32
I am trying to join both files using the following command
join -t/ -1 1 -2 2 FILE1 FILE2
I expect the following output:
1/temperature/2008-10-01/68
1/temperature/2008-10-01/89
1/temperature/2008-10-01/45
1/temperature/2008-12-01/61
1/temperature/2008-10-10/32
2/rainfall/2008-10-02/6
3/snowfall/2008-10-03/4
4/windspeed/2008-10-04/25
4/windspeed/2008-10-01/35
5/winddirection/2008-10-05/120
5/winddirection/2008-11-01/360
but I am having the first 5 rows in this way:
1/temperature/2008-10-01/68
2/rainfall/2008-10-02/6
3/snowfall/2008-10-03/4
4/windspeed/2008-10-04/25
5/winddirection/2008-10-05/120
Please your help what I am doing wrong