{
if(FNR==NR) { # first file
map[$1]=1
} else { # second file
if ($1 in map) {
} else {
print $1
}
}
}
# awk -f this.awk file1 file2
# 输出所有 file2 中存在, 但 file1 中不存在的行.
Last active
March 9, 2016 07:21
-
-
Save Chunlin-Li/1cc5b6f6868f43f8da52 to your computer and use it in GitHub Desktop.
用 awk 判断文件2中的行是否在文件1中都存在.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment