I have a file that looks like this:AA  110 B   2   ..  BB  3   ... BBB 3   D   F   3   D   DAA  111 B   2   ..  BB  3   ... BBB 0   F   F   0   F   FAA  112 C   2   ..  BB  3   ... BBB 0   D   F   0   D   FAA  120 D   2   ..  FF  3   ... FFF 3   D   F   3   D   DI would like to remove any line that contain the specific numerical value of 0. If I do:sed '/0/d' infile > newfilethen lines 1 and 4 are deleted because they contain 0s in 110 and 120. I tried other options with grep grep -v '0' infile > newfile or awk but no luck.I'm sure there is a straightforward way for doing this but cannot find it. Any thoughts?Thanks!
Delete line with specific numerical value
text processing
Add -w to grep to do whole-word matching:$ grep -vw 0 infile AA  110 B   2   ..  BB  3   ... BBB 3   D   F   3   D   DAA  120 D   2   ..  FF  3   ... FFF 3   D   F   3   D   D