Results 1 to 1 of 1
Hello,
I have two files. The two files contains approx 2.5million lines. The first file contains around 20 columns and the 2nd file contains 3 columns.
I would like to ...
- 11-02-2011 #1Just Joined!
- Join Date
- May 2011
- Location
- Germany
- Posts
- 5
awk command to replace columns from two different files
Hello,
I have two files. The two files contains approx 2.5million lines. The first file contains around 20 columns and the 2nd file contains 3 columns.
I would like to replace the whole column from the first file, 16th column with the data from the 2nd file -3rd column. So basically something like this
1st file
1st 2nd 3rd ...... 16th.... 20th
a 1 x .......... 100 ...
b 2 y .......... 200 ...
c 3 z .......... 300 ...
2nd file
1st 2nd 3rd
a 1 700
b 2 800
c 3 900
output needed:
1st 2nd 3rd ...... 16th.... 20th
a 1 x .......... 700 ...
b 2 y .......... 800 ...
c 3 z .......... 900 ...
any suggestions if I can use awk or sed ?
Thank you.


Reply With Quote