- 论坛徽章:
- 2
|
回复 5# lionfun
`RS == "\n"'
Records are separated by the newline character (`\n'). In effect,
every line in the data file is a separate record, including blank
lines. This is the default.
`RS == ANY SINGLE CHARACTER'
Records are separated by each occurrence of the character.
Multiple successive occurrences delimit empty records.
`RS == ""'
Records are separated by runs of blank lines. When `FS' is a
single character, then the newline character always serves as a
field separator, in addition to whatever value `FS' may have.
Leading and trailing newlines in a file are ignored.
`RS == REGEXP'
Records are separated by occurrences of characters that match
REGEXP. Leading and trailing matches of REGEXP delimit empty
records. (This is a `gawk' extension; it is not specified by the
POSIX standard.) |
|