Compare selected columns of two files and print whole line with mismatch
hi! i researched about comparing two columns here and got an answer. but after examining my two files, i found out that the first columns of the two files are not unique with each other. all i want to compare is the 2nd and 3rd column.
Hi guys,
I need some help to come out with a solution . I have seven such files but I am showing only three for convenience.
filea
a5 20
a8 16
fileb
a3 42
a7 14
filec
a5 23
a3 07
The output file shoud contain the data in table form showing first field of... (7 Replies)
i need to compare three files in unix
a.txt b.txt c.txt
1 2 1
2 5 3
4 6 5
5 6
6
i need to insert a blank line in the file if i don't find a match
and put the items at the same column if found a match
The items in the files... (4 Replies)
Using unix shell script, how to compare two files and print lines with mismatch? Below are the requirements:
1. The number of lines on the two files is not the same.
2. The difference/mismatch can be found on the second or third column.
3. The comparison is not between line 1 of file 1 and line... (16 Replies)
I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem.
I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
File 1 has 16 columns so does File 2
I want to remove all records from File 2 that column 1 and column 16 match between file 1 and file 2
delimter of files is ~ (10 Replies)
Hello. I have two files. FILE1 was extracted from FILE2 and modified thanks to help from this post. Now I need to replace the extracted, modified lines into the original file (FILE2) to produce the FILE3.
FILE1
1466 55.27433 14.72050 -2.52E+03 3.00E-01 1.05E+04 2.57E+04
1467 55.27433... (1 Reply)
I need to compare two files and find the mismatch columns in it for csv and fixed
width file.
Eg:
file1
c1,c2,c3,c4<----columnname
1,a,4,d
2,b,5,e
3,c,6,f
file2
c1,c2,c3,c4<----columnname
3,x,7,f
2,y,8,e
1,z,9,d
output
c2,c3<---- mismatch columname
a,4 x,7
b,5 or y,8 Ok with... (3 Replies)