$ echo "I ate an apple. " | gawk '/apple|banana/{print $0}'
输出:
I ate an apple.
$ echo "I ate a banana. " | gawk '/apple|banana/{print $0}'
输出:
I ate a banana.
$ echo "I ate a peach. " | gawk '/apple|banana/{print $0}'
输出:
(未匹配,无输出)
$ echo "I ate an apple. " | gawk '/apple|banana/{print $0}'
输出:
I ate an apple.
$ echo "I ate a banana. " | gawk '/apple|banana/{print $0}'
输出:
I ate a banana.
$ echo "I ate a peach. " | gawk '/apple|banana/{print $0}'
输出:
(未匹配,无输出)