Hi All,
How can I compare two files for eg if line in filea is not in fileb print "filea Diff in" and if line in fileb is not in filea print "fileb Diff in". The below code will work if I put fileb as the first file and filea as the second
awk '
NR==FNR{a[$0];next}
{if (!($0 in a)){
print "Diff in =====>",$0
}
}
' filea fileb
Thanks
Chris
How can I compare two files for eg if line in filea is not in fileb print "filea Diff in" and if line in fileb is not in filea print "fileb Diff in". The below code will work if I put fileb as the first file and filea as the second
awk '
NR==FNR{a[$0];next}
{if (!($0 in a)){
print "Diff in =====>",$0
}
}
' filea fileb
Thanks
Chris