I have four input files and have to combine all the four files. below is the sample. Please let me know if its possible through sort.
Input:
File 1
111 aaa
222 bbb
222 bbb
File 2
111 ccc
222 ddd
333 eee
222 ddd
333 eee
File 3
111 aaa
333 fff
444 ggg
333 fff
444 ggg
File 4
111 hhh
555 iii
555 iii
Output:
111 aaa ccc aaa hhh
222 bbb ddd
333 eee fff
444 ggg
555 iii
222 bbb ddd
333 eee fff
444 ggg
555 iii