I have a (large) CSV file (A) that has this structure:
1234ABC 456789
1235ABD 098732
1235ABE 098731
1235ABF 198731
Another file (B) contains entries that should be removed from A:
1234ABC
1235ABE
I want to run a awk or sed command (or some command-line script if awk or sed are not sufficient) that removes all lines from A whose first column is equal to a line in B. I.e. the result in A after the script has run should be:
1235ABD 098732
1235ABF 198731
Note that it's not enough to simply remove a line in A that starts with any of the lines in B. For example, if A contains:
1235AC 456789
1235A 098732
and B contains:
1235A
then A should contain this afterwards:
1235AC 456789
How can I achieve this in bash, preferably using awk or sed (or a shell script if required)?