Makes a typescript of a terminal session.
script [ -a ] [ File ]
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.
Since 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. For related information, see the exec subroutine.
-a | Appends the typescript to the specified file or to the typescript file. |
/usr/bin/script | Contains the script command. |
The tee command.
Input and Output Redirection Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices describes how the operating system processes input and output and how to use the redirect and pipe symbols.