Merge two files in linux with different column
awk, bash, sed
Solution
paste file1 file2 | awk '{print $1,$2,$3,$5}'
Problem
I have two files in linux, the first file has 4 columns and the second has 2 columns. I want to merge these files into a new file that has the first 3 columns from file 1 and the first column from file 2. I tried awk, but my data from file 2 was placed under file 1.