I have a CSV file that contains two columns. First column is a list of all subscribers and second column is a list of subscribers who need to be excluded from a mailing:
all,exclusions
alice@example.com,charles@example.com
bill@example.com,alice@example.com
charles@example.com
daisy@example.com
esther@example.com
I need to end up with an output of all subscribers from first column who are not listed in the second column. The desired output is something like this:
bill@example.com
daisy@example.com
esther@example.com
So far all I have is this:
awk -F, '(NR>1) {if($1!=$2) {print}}' subs.csv
This of course will only filter out the rows when there are matching values in both columns on the same row. Thanks for any help.