
MG: Welcome to Revisionist History, where every week we reexamine something from the past that's been forgotten or misunderstood. Malcolm Gladwell: And that high school, you started there in 9th grade? Carlos Doesn't Remember with Malcolm GladwellĮpisode 4 | Season 1| Revisionist History Length: 34 min | Released: July 6, 2016Ĭarlos: Yes, I am a sophomore in high school.


While the history command records the commands you enter, script is more thorough in allowing you to review command output as well as the commands that were run.Transcripts for the entire Season 1 and Season 2 podcasts of Revisionist History are available here.

The script command is very handy when you want to remember, review or rerun a sequence of commands and output details on a Linux system. o, -output-limit terminate if output files exceed size E, -echo echo input (auto, always or never) force use output file even when it is a link
#SEASON 1 EPISODE 4 THE OFFICE SCRIPT CODE#
e, -return return exit code of the child process c, -command run command rather than interactive shell m, -logging-format force to 'classic' or 'advanced' format t, -timing deprecated alias to -T (default file is stderr) T, -log-timing log timing information to file O, -log-out log stdout to file (default) You can read the man page for the script command or ask for explanations of the script command syntax and options with the command shown below. You can display the version of script that you are running like this: $ script -V The output file would look like this: $ cat out The input file would look like this: $ cat in The -q (or -quiet) option keeps the start and end times from being displayed on standard output (generally your terminal window). Check the script man page to see what options are available to you. The -I (capital "i") specifies the file for input and the -O (capital "o") the file for output. This might more easily allow you to turn the commands saved into a script since they will be in a file without the command output. On some Linux systems (like Fedora), the script command also makes it possible to separate input from output in your session recording using the -I (or -log-in) and -O (or -log-out) options. Script started, output log file is 'myloop'. In this next example, we use the -c option to run a script and save the interaction in a file named "myloop". You can also pass a command line to script like this: $ echo date | script Script started, output log file is 'typescript'. The start and end times are not included in the output when this option is used. Note that quotation marks are needed if the command requires more than one string. To run a single command and record the interaction, you can specify the command as shown below that uses the -c (or -command) option. When you use the -c (or -command) option, the script command runs the command given and non-interactively. If you want to append the recording of session activity to an existing file, you can use the -a (or -append) option. Notice that the file used to record session activity includes not only the commands typed and the output generated but also the time and date that file recording began and ended. The content of the updates file would look like this: $ cat updates Script started, output log file is 'updates'. You can provide a more meaningful name if you use a command like the one shown below that adds the filename to the command: $ script updates
