pearlofperls
Technical User
i have 2 files and i want to compare
i currently cat the files and awk print $1, $2 and doing if file1=file2 then fail, else exit 0
what i want to do is compare values, with column 1 being a reference i want to compare line by line and then do:
the values not matching is a success
the values matching is failure
like a vlookup in excel
file 1
scott 1.4
suzy 3.5
josh 5.3
amanda 4.2
luke 2.1
file 2
file2
scott 4.1
suzy 3.5
josh 5.3
amanda 2.4
luke 1.2
i currently cat the files and awk print $1, $2 and doing if file1=file2 then fail, else exit 0
what i want to do is compare values, with column 1 being a reference i want to compare line by line and then do:
the values not matching is a success
the values matching is failure
like a vlookup in excel
file 1
scott 1.4
suzy 3.5
josh 5.3
amanda 4.2
luke 2.1
file 2
file2
scott 4.1
suzy 3.5
josh 5.3
amanda 2.4
luke 1.2