.TH SCRIPT 1l .SH NAME script \- record a terminal session .SH SYNOPSIS .B script [ \-aq ] [ \-s .I shell .B ] [ .I file .B ] .SH DESCRIPTION .I Script records an interactive session in a file as it appears on the tty. .PP If .I file is specified, the script is recorded in .I file. Otherwise, the session is recorded in .B typescript in the current directory. The .B \-s option causes .I shell to be used instead of that specified by the .B SHELL environment variable. If .B SHELL is not defined, the default is .B /bin/sh. Other options and their actions are: .TP "\w'\-a\ \ 'u" .B \-a Append to the script file. Otherwise, the file is truncated. .TP .B \-q Quiet mode. Don't print the time and date at the beginning and end of the script. .PD .PP .SH FILES .cc x ./typescript xcc .SH SEE ALSO sh(1), csh(1), ksh(1) or whatever you use. .SH DIAGNOSTICS Various complaints when \fIopen\fR(2), \fIfork\fR(2), \fIexec\fR(2), or \fIpipe\fR(2) calls fail. .SH BUGS User input and program output are intercepted by different processes; they might not appear in the same order in the script file as they did on the tty. .PP This is a generic version, using only pipes. It should work on any reasonable imitation of Unix, but knows nothing about sockets, Streams or ptys. Programs which care whether they are talking to a tty might not work right. Commands like \fIps\fR(1) which care about process groups probably won't work right. The compiled version may only run from /usr/local/bin/script. Source is lost.