4.1 System Resources
Syntax
script [-a] [file] <. . .> exit
Common Options
-a append the output to file
typescript is the name of the default file used by script.
You must remember to type exit to end your script session and close your typescript file.
Examples
beauty condron>script
Script started, file is typescript
beauty condron>ps
PID TT STAT TIME COMMAND
23323 p8 S 0:00 -h -i (tcsh)
23327 p8 R 0:00 ps
18706 pa S 0:00 -tcsh (tcsh)
23315 pa T 0:00 emacs
23321 pa S 0:00 script
23322 pa S 0:00 script
3400 pb I 0:00 -tcsh (tcsh)
beauty condron>kill -9 23315
beauty condron>date
Mon Apr 22 22:29:44 EDT 1996
beauty condron>exit
exit
Script done, file is typescript
[1] + Killed emacs
beauty condron>cat typescript
Script started on Mon Apr 22 22:28:36 1996
beauty condron>ps
PID TT STAT TIME COMMAND
23323 p8 S 0:00 -h -i (tcsh)
23327 p8 R 0:00 ps
18706 pa S 0:00 -tcsh (tcsh)
23315 pa T 0:00 emacs
23321 pa S 0:00 script
23322 pa S 0:00 script
3400 pb I 0:00 -tcsh (tcsh)
beauty condron>kill -9 23315
beauty condron>date
Mon Apr 22 22:29:44 EDT 1996
beauty condron>exit
exit
script done on Mon Apr 22 22:30:02 1996
beauty condron>