I have a CSV file like this:
text,0
more text,2
some more text,100
I need to delete any line containing only 0 in the second column, e.g., the output of the above would be:
more text,2
some more text,100
How can I delete all lines from a CSV with an exact match?
If that’s your last field, grep will do the trick:
If not, and your fields don’t contain
,, use awk:If it’s even more complex use python or ruby with a CSV parser.