I have an awk script to check one file against another and print if the field doesn't match and go to another file 'removed' if it is:
BEGIN {
FS = ","
while ((getline < "tps_ns.txt"
>0)a[$0] = 1
phfld = 10
}
{
if (!a[$phfld]) print
else print >"removed"
}
Is there a way to make it check another field aswell ie. if both fields match then go to another file?
Thanks
BEGIN {
FS = ","
while ((getline < "tps_ns.txt"
phfld = 10
}
{
if (!a[$phfld]) print
else print >"removed"
}
Is there a way to make it check another field aswell ie. if both fields match then go to another file?
Thanks