script(1) — Commands
NAME
script − Makes a transcript of terminal session
SYNOPSIS
script [-a] [file]
The script command makes a transcript of everything printed on your terminal.
FLAGS
-aAppends the transcript to file rather than writing it to file.
DESCRIPTION
The transcript is written to file, or appended to file if the -a flag is given. If no filename is given, the transcript is saved in the file typescript.
The script ends when the forked shell exits.
This program is useful when you are using a CRT and want a hard-copy record of the dialog (for example, a technical writer might create an example of a working session this way).