- 论坛徽章:
- 145
|
回复 12# zl624867243
1. 符号别乱用 Using the right sign
Using a semi-colon (;), not a comma(,)
2. 如此写何意?
一个冲红灯没事,另一个死伤惨重
你问为啥?两个都不对有啥好问?
注:两个都走错路,都冲红灯,有啥差异?
https://www.gnu.org/software/gawk/manual/gawk.html#index-comma-_0028_002c_0029_002c-in-range-patterns
7.1.3 Specifying Record Ranges with Patterns
A range pattern is made of two patterns separated by a comma, in the form ‘begpat, endpat’. It is used to match ranges of consecutive input records. The first pattern, begpat, controls where the range begins, while endpat controls where the pattern ends. For example, the following:
awk '$1 == "on", $1 == "off"' myfile
prints every record in myfile between ‘on’/‘off’ pairs, inclusive. |
|