I want to delete duplicate entry e from file1 if e is also present in file2.Input file1:x1  y1x2  y2x3  y3x4  y4y1  x1x5  y5y3  x3x6  y6x5  y5Input file2:y1  x1y2  x2y3  x3y4  x4x1  y1y5  x5x3  y3y6  x6x5  y5Desired output:x1  y1x2  y2x3  y3x4  y4x5  y5x6  y6I have used following shell script:awk 'FNR==NR {   lines[NR,col1] = $1   lines[NR,col2] = $2   lines[NR,line] = $0   next    }  (lines[FNR,col1] != $1) {($1 in lines)    print lines[FNR,line]    next}' file1.txt file2.txtBut it is giving following output:x1  y1x2  y2x3  y3x4  y4y1  x1x5  y5y3  x3x6  y6
remove duplicate entry from file1 if entry present in file2
awk