script

Create a typescript of a terminal session

Syntax:

script [-a] [file]

Runs on:

Neutrino

Options:

-a
Append the output to file or to the typescript file, retaining the prior contents.
file
Name of the file script will use to save the session output. If you don't specify a file, output is saved in the file typescript.

Description:

The script utility records everything printed to the terminal during a session. This is useful, for example, if you want to record an interactive session and then save the typescript file for later analysis, tech support, etc.

The script ends when the forked shell exits (via Ctrl-D).


Note: Certain interactive utilities (e.g. vi) can create garbage in the typescript file. The script command works best with utilities that don't manipulate the screen; the results are meant to emulate a hardcopy terminal.

Note also that script records all transactions, including linefeeds and backspaces.


See also:

ksh (for the history feature)