- 论坛徽章:
- 0
|
回复 #5 action08 的帖子
man awk
- Records
- Normally, records are separated by newline characters. You can control
- how records are separated by assigning values to the built-in variable
- RS. If RS is any single character, that character separates records.
- Otherwise, RS is a regular expression. Text in the input that matches
- this regular expression separates the record. However, in compatibil-
- ity mode, only the first character of its string value is used for sep-
- arating records. If RS is set to the null string, then records are
- separated by blank lines. When RS is set to the null string, the new-
- line character always acts as a field separator, in addition to what-
- ever value FS may have.
复制代码
看这一段
- If RS is set to the null string, then records are
- separated by blank lines. When RS is set to the null string, the new-
- line character always acts as a field separator, in addition to what-
- ever value FS may have.
- 如果RS设置为空串,记录以空行分割。当RS设置为空串,换行符总是扮演分割符的角色,无论FS是什么值。
复制代码 |
|