Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
很简单的问题。当少于 3 列时,我只需要从列表中删除行
例如:
a b c a b <--- This one needs to disappear a b c
我很确定 awk NF 做到了,但我似乎无法做到这一点。
提前致谢!
sed、grep、awk 都可以完成这项工作。既然你更喜欢 awk,看看这是否有帮助?
awk 'NF>=3' file