Input and output

This section describes the input output.

Function Syntax/Description
print lines [Line1 [,Line2] ] p

Writes the indicated lines to STDOUT at the point in the editing process that the p command occurs.

write lines [Line1 [,Line2] ]w FileName

Writes the indicated lines to a FileName at the point in the editing process that the w command occurs.

If FileName exists, it is overwritten; otherwise, it is created. A maximum of 10 different files can be mentioned as input or output files in the entire editing process. Include exactly one space between w and FileName.

read file [Line1]r FileName

Reads FileName and appends the contents after the line indicated by Line1.

Include exactly one space between r and FileName. If FileName cannot be opened, the command reads it as a null file without giving any indication of an error.