Delete rows based on array of strings

Hi All,

I have a file with around 1000 rows and one of the fields is an account number. I have been provided with a few account numbers, when any of the account number appears in a row then the row has to be deleted.
Can we place the account numbers in an array and use awk or sed for this task?

Thanks,
Mc

Hello mrcool4,

On unix.com we encourage users to post their efforts in their question which they have put in order to solve their own problems.
So kindly do so and let us know then.

Thanks,
R. Singh

1 Like

study manual of awk

How about grep -v ? But - beware of false triggers.