Records

An awk data file is a collection of records. A record contains a number of pieces of information about a single item; these pieces are called fields.

Records are separated by a record separator character, which, for awk, is usually the newline character. The newline character shows where one line of text ends and another begins. By using the newline as a record separator, each line of the file becomes a separate record. This is convenient and easy to understand; newline is used as a record separator in all of the examples.

In the hobbies file, each line is a separate record, giving a set of information about one person's hobby.