linuxjishu/13830.html target=_blank class=infotextkey>awk打印出file1和file2各自多出来的内容
NR == FNR {
f1[$0]++
next
}
$0 in file1{
f1[$0]=same
next
}
{
f2[NR]=$0
}
END{
for (i in f2)
print f2[i]
for (i in f1)
while(f1[i]--)
print i
}