[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5

script Command

Purpose

Makes a typescript of a terminal session.

Syntax

script [ -a ] [ File ]

Description

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.

Flags

-a Appends the typescript to the specified file or to the typescript file.

Files

/usr/bin/script Contains the script command.

Related Information

The tee command.

Input and Output Redirection Overview in AIX 5L Version 5.2 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.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]