macOS / binaries /

script

/usr/bin/script
Make typescript of terminal session

The script utility makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive session as proof of an assignment, as the typescript file can be printed out later with lpr.

source: man