LaTeX uses the ability to write to a file and later read it back in to build document components such as a table of contents or index. You can also read a file that other programs written, or write a file for others to read. You can communicate with users through the terminal. And, you can issue instructions for the operating system.
|• \openin & \openout:||Open a file.|
|• \read:||Read text from a file.|
|• \typein:||Read text from the terminal.|
|• \typeout:||Write text to the terminal.|
|• \write:||Write text to a file or terminal.|