how can I print difference line number and column number for tab separated files in linuxexample- compare File 1 vs File2 and print line no. for difference record and column no of difference present in file2.In file1:User_ID   First_name    Last_name   Address                     Postal_code User_1    fistname      Lastname    35, Park Lake, California           32068user2     Johnny        Depp        32, Park Lake, California           user3     Tom           Cruise      5322 Otter Lane Middleberge         32907user4     Leonardo      DiCaprio    Half-Way Pond, Georgetown           1230user5   Sylvester       Stallone    6762,33 Ave N,St. Petersburg        33710andIn file2:User_ID   First_name    Last_name   Address                     Postal_code User_1    fistname      Lastname    35, Park Lake, California           32068user2     Johnny        Depp        32, NEW Street, California          96206user30    Tom           Cruise      5322 Otter Lane Middleberge         32907user4     Leonardo      DiCaprio'   Half-Way Pond, Georgetown           00000user5     Sylvester     Stallone    6762,33 Ave N,St. Petersburg        33710user6     Nicolas           Cage                                        55010expected result:- difference in file2 is for line number followed by column number- 3 COLUMN NO- 4,54 COLUMN NO-1 5 COLUMN NO 3,56 COLUNN NO 57 COLUMN NO 1,2,3,4,5Note: File size to be compare is in GB and File is tab separated and has more than 400 tab separated column.Currently I am using Awk command for printing the line number but i am not able to get column no. Can we loop the awk or have nested awk Current command using-awk 'NR==FNR{Arr[$0]++;next}!($0 in Arr){print FNR}' file1 file2
print difference line number and column number for tab separeated files in linux
linux