내 출력 파일에는 원하는 출력과 함께 다음 줄을 여러 번 포함합니다.
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
이것이 내 출력의 모습입니다.
####################################################################
Raw Error: count of the error records with latest trans session in "audit_preatlas_wb4370_raw_error_05012016073248" table
====================================================================
count trans_session
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
********************************************************************
Raw Audit: Total records available in "audit_preatlas_wb4370_raw_audit_05012016073248" table
====================================================================
count trans_session
Raw Audit: Distinct records of "audit_preatlas_wb4370_raw_audit_05012016073248" table
====================================================================
count trans_session
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
Raw Audit : count of duns with error "gbwr_raw_audit_mandatory_field" code in "audit_preatlas_wb4370_raw_audit_05012016073248" table
====================================================================
count trans_session error_code
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
Raw Audit : count of duns with error "gbwr_raw_audit_numeric_field" code in "audit_preatlas_wb4370_raw_audit_05012016073248" table
====================================================================
count trans_session error_code
WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.
WARN: Please see http://www.slf4j.org/codes.html#release for an explanation.
WARN 줄을 개별적으로 삭제하려면 어떻게 해야 합니까?
답변1
그래서 여러 가지 방법이 있습니다. 위의 검토를 요약하려면 다음 중 하나를 수행할 수 있습니다.
이상한:
awk '!/^WARN/' filename
sed:
sed '/^WARN/d' filename
그렙:
grep -v '^WARN' filename