Programming/쉘 프로그래밍
awk 응용 예제 정리
Antamis
2019. 1. 15. 09:22
1. 아파치 accesslog 중 특정 도메인을 추출한 파일 (domain.com.txt)의 해외 접속 기록만 확인
cat domain.com.txt | awk '$1 != "KR" {print $0}'
(1번째 필드가 mod_geoip에 의해 출력되어야함, 로그포맷 변경 및 GeoIP와 GeoIP-devel 설치 필수)