The "EX" command is used to write the current buffer to the output file, copy the remainder of the input file to the output file, and exit from TECO. For example, EX$$ (Note that the <ESC> key echoes as "$" at your terminal, and that you must type the <ESC> key twice to cause the command to be executed.)