linux - deleting some undesirable rows -


i have file below , want delete rows don't have value in fourth column.

experiment replica module mean general1 0 scenario.host[229].app   general1 1 scenario.host[229].app 0.00235355  general1 2 scenario.host[229].app   general1 3 scenario.host[229].app 0.0783413  general1 4 scenario.host[229].app   general3 0 scenario.host[229].app   general3 1 scenario.host[229].app 0.540335  general3 2 scenario.host[229].app   general3 3 scenario.host[229].app   general3 4 scenario.host[229].app   general1 0 scenario.host[229].app   

try following:

awk 'nf>3' file 

edit: added per @adrianfrühwirth's request:

whenever find writing requirements in negative terms (e.g. "i want delet rows doesn't have...") take second see if can express in positive way (e.g. "i want select rows have...") , you'll find easier come solution , avoid risk of introducing double negatives make comprehension far more difficult.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -