- 论坛徽章:
- 0
|
请看一下下面两种不同的说明:
RS
Input record separator (default is a new-line character). If the RS special variable is null, records are
separated by sequences of one or more blank lines; leading or trailing blank lines do not result in empty
records at the beginning or end of input; and the new-line character is always a field separator, regardless
of the value of the FS special variable.
Normally, AWK reads one line at a time, and breaks up the line into fields. You can set the "RS" variable to change AWK's definition of a "line." If you set it to an empty string, then AWK will read the entire file into memory. You can combine this with changing the "FS" variable. |
|