You can use the join command (input files must be sorted on the first column) : Code:
join kamal1.dat kamal2.dat
Input file 1 (kamal1.dat) :
Code:
111
222
333
888
Input file 2 (kamal2.dat) :
Code:
000 1000
111 1111
222 1222
444 1444
777 1777
888 1888
999 1999
Output :
Code:
111 1111
222 1222
888 1888
Jean-Pierre.
|