0
다음과 같은 파일이 있는데 네 번째 열에 값이없는 행을 삭제하려고합니다.일부 바람직하지 않은 행을 삭제합니다.
awk 'NF>3' file
편집 :
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
'grep -v .app $ file'처럼 간단한 것을 찾고 계십니까? –
행에 헤더가 포함되어 있습니까? – tink
당신이 부정적인 용어로 요구 사항을 작성할 때마다 (예 : "** 삭제 ** ** **없는 행 ** ...") 긍정적 인 것으로 표현할 수 있는지 잠시 확인하십시오. (예 : "** ** ** ** 행을 선택하고 싶습니다. ** ...") 일반적으로 좋은 해결책을 제시하고 두 배의 부정적인 요소가 생기는 위험을 피하는 것이 더 쉽습니다. 이해는 훨씬 어렵다. –