z/OS UNIX System Services User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Combining files

z/OS UNIX System Services User's Guide
SA23-2279-00

Occasionally, you may want to combine a number of files into a single document. For example, you may have a table of data stored in one file and want to add the table to another file. You can read in the contents of a file after the line that holds the cursor. The r stands for Read; it reads the contents of a file to be added to the current file after the line indicated by the cursor.

The same sort of command can be used to combine the chapters of a document into a single file. For example,
:r chapter1
G
:r chapter2
G
:r chapter3
will read in chapters that are stored in separate files. Notice that we had to use G commands to go to the end of the file after each read operation, so that the next input file would be added to the end of the text.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014