Quote:
RS The first character of the string value of RS is
the input record separator; a newline character by
default. If RS contains more than one character,
the results are unspecified. If RS is null, then
records are separated by sequences of one or more
blank lines.
OFS The print statement output field separator; a
space character by default.
|
'$1=$1' - re-evaluates the records AND prints it.
Having set the RS='' makes all your
records/lines appear as
fields.
Specifying OFS=',' makes ',' a new field separator.