Remove lines matching a substring in a specific column

Dear group,

I have following input text file:

Brit  2016  11  18  12  00  10  1.485,00    EUR
Brit  2016  11  18  12  00  10  142,64      EUR
Brit  2016  11  18  12  00  10  19,80       EUR
Brit  2016  11  18  12  00  10  545,00      EUR
Brit  2016  11  18  12  00  10  6.450,00    EUR
ABrit  2016  11  18  12  00  10  7.150,00    EUR

I want to remove those lines who match $1=Brit and $8 doesn't contain a dot ('.')!

awk or sed is just find.

Thank you for your kind support

Use code tags for code please.

awk '($1 == "Brit") && !($8 ~ /[.]/) { next } 1' inputfile > outputfile
1 Like

Slightly shorter:

awk '($1 != "Brit") || ($8 ~ /[.]/)' file
1 Like

yes indeed!

Thank you for your prompt help. It did work.