Last modified: 2021-05-21
This is a course page of
David Casperson
Associate Professor
Computer Science
University of Northern British Columbia

CPSC 100 — Computer Programming I — Fall 2012

Picture of what script does

Without script
Data flow without script
With script
Data flow with script

How to use script and scriptfix

What script does

The script program intercepts communication between the shell (the program that prints the “%” signs) and the keyboard and terminal window, and duplicates it and copies it to a file.

To use script

  • Type
    script scriptfilename
    to begin capturing information in a script file.
  • Do what you would normally do.
  • Type control-D to quit the script session.

What scriptfix does

The scriptfix removes control codes (like backspace characters, and instructions that cause inverse video) from the scriptfile.

This is necessary because script just splits the program output in two. Information that is useful to the terminal window is not useful in the scriptfile.

To use scriptfix

Home page Semesters Site Map
go back Fall 2012 go forward
2024-11 other links

CPSC 100 [Other years]
Dates
Policies
Labs
Lab and Tutorial Schedule
Old Exams
How to use scriptfix
Blackboard Link
CPSC 370 [Other years]
Java
David’s Schedule

fall-2024