unless this is to be first field (e.g., word) in the line (record), print the field separator (e.g., space for words in a line, comma for CSV, tab for TSV). then, print the given field data. the output subsystem automatically keeps track of whether we are at first field in a record.
optionally, automatic escaping or quoting if the field data contains a field or record separator.
similarly, automatic record terminator (e.g., newline) on orderly file close.
in general: field prefix, field terminator, field separator, record prefix, record terminator, record separator. not all of these will be used.
No comments :
Post a Comment