sed/awk - How to remove lines with less than 3 columns

awk, bash, sed

Solution

sed, grep, awk all can do this job. since you prefer awk, see if this helps?

awk 'NF>=3' file

Problem

Really simple question. I simply need to remove lines from a list when there are less than 3 columns Eg: ``` a b c a b <--- This one needs to disappear a b c ``` I'm pretty sure awk NF does it, however I can't seem to get it right. Thanks in advance!

Original source