gawk: Default Field Splitting
1
1 4.5.1 Whitespace Normally Separates Fields
1 ------------------------------------------
1
1 Fields are normally separated by whitespace sequences (spaces, TABs, and
1 newlines), not by single spaces. Two spaces in a row do not delimit an
1 empty field. The default value of the field separator 'FS' is a string
1 containing a single space, '" "'. If 'awk' interpreted this value in
1 the usual way, each space character would separate fields, so two spaces
1 in a row would make an empty field between them. The reason this does
1 not happen is that a single space as the value of 'FS' is a special
1 case--it is taken to specify the default manner of delimiting fields.
1
1 If 'FS' is any other single character, such as '","', then each
1 occurrence of that character separates two fields. Two consecutive
1 occurrences delimit an empty field. If the character occurs at the
1 beginning or the end of the line, that too delimits an empty field. The
1 space character is the only single character that does not follow these
1 rules.
1