It can be used to obtain a copy of a program run, which should be placed in your notebook and will be a required part of an assignment submission.
Everything between the script and the exit
command is logged to the file. This includes the confirmation messages
from script itself.
For example:
% script hw0.scr
Script started, file is hw0.scr
% ls
hw0.scr square.scm
% cat square.scm
;; your name
;; your id
;; your section # or time
;; square takes a number as an input parameter and
;; returns the square of it.
(define (square x)
(* x x))
% module load soft/tcl/8.3.1
% stk
Welcome to the STk interpreter version 4.0.1 [SunOS-5.7-sun4]
Copyright © 1993-1999 Erick Gallesio - I3S - CNRS / ESSI |
% less hw0.scr
Script started on Wed Sep 06 09:34:14 2000
% ls
hw0.scr square.scm
% cat square.scm
;; your name
;; your id
;; your section # or time
;; square takes a number as an input parameter and
;; returns the square of it.
(define (square x)
(* x x))
% module load soft/tcl
% stk
Welcome to the STk interpreter version 4.0.1 [SunOS-5.7-sun4]
Copyright 1993-1999 Erick Gallesio - I3S - CNRS / ESSI
|
script will not complain if:
User Commands script(1)
NAME
script - make record of a terminal session
SYNOPSIS
script [ -a ] [ filename ]
DESCRIPTION
script makes a record of everything printed on your screen.
The record is written to filename. If no file name is
given, the record is saved in the file 'typescript'.
The script command forks and creates a sub-shell, according
to the value of $SHELL, and records the text from this ses-
sion. The script ends when the forked shell exits or when
CTRL-D is typed.
OPTIONS
-a Append the session record to filename, rather than
overwrite it.
NOTES
script places everything that appears on the screen in
filename, including prompts.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.6 Last change: 8 Feb 1994 1
Sunny Kim (kimx0320@itlabs.umn.edu)