Makes a typescript of a terminal session.
The script command makes a typescript of everything displayed on your terminal. The typescript is written to the file specified by the File parameter. The typescript can later be sent to the line printer. If no file name is given, the typescript is saved in the current directory with the file name typescript.
The script ends when the forked shell exits.
This command is useful for producing hardcopy records when hardcopy terminals are in short supply. For example, use the script command when you are working on a CRT display and need a hardcopy record of the dialog.
Because the script command sets the SetUserID mode bit, due to security reasons the value of LIBPATH variable is unset when the command is invoked. However, LIBPATH is automatically reset in the forked shell if it is defined in the environment file. This behavior is also true for the NLSPATH environment variable. For related information, see the exec subroutine.
Item | Description |
---|---|
-a | Appends the typescript to the specified file or to the typescript file. |
-q | Suppresses diagnostic messages. |
Item | Description |
---|---|
/usr/bin/script | Contains the script command. |