수색…


정규식 패턴

패턴은 정규식으로 지정할 수 있습니다.

/regular expression/ {action}

예 :

echo "[email protected]
not an email" | awk '/[^@]+@.+/ {print}'

생산 :

[email protected]

print 서술문으로 만 구성된 작업은 완전히 생략 할 수 있습니다. 위의 예제는 다음과 같습니다.

echo "[email protected]
not an email" | awk '/[^@]+@.+/'


Modified text is an extract of the original Stack Overflow Documentation
아래 라이선스 CC BY-SA 3.0
와 제휴하지 않음 Stack Overflow