script(TC)


script -- make typescript of terminal session

Syntax

script [ -a ] [ -S ] [ -N ] [ file ]

Description

script keeps a record of everything printed on your terminal in a file that can be sent to the printer with the lp(C) command. This is useful when you need a hard-copy record of an interactive session, as when a student must hand in the results of running a program or a user reports a problem.

The supported options and arguments are:


-a
append the information to the specified file. If this is not specified, the output overwrites information in an existing file.

file
The file where the data will be written. If this is not specified, the output is saved in the file typescript.

The following options are useful for simulating and debugging problems with different pseudo-ttys:


-S
causes the forked shell to run on a STREAMS pseudo-tty (/dev/pts%03d); otherwise, the forked shell runs on a BSD pseudo-tty (/dev/ttyp%d).

-N
causes script to open the pseudo-tty with O_NOCTTY, resulting in a session with no controlling tty.

The script ends when the forked shell exits.

Limitations

script places everything in the log file. This is not what the naive user expects.

The STREAMS pseudo-ttys used in SCO OpenServer have limited functionality, such as no job control.

Differences between versions

The -S and -N options are supported only on SCO OpenServer Release 5.0.6 and later versions.

See also

grantpt(S), ptmx(M), ptsname(S), unlockpt(S)

Standards conformance

script is conformant with X/Open Portability Guide, Issue 4, 1992. The -S and -N options are not part of any standard.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005