---------------------------- Generating Text Screen Dumps ---------------------------- -Ian! D. Allen - idallen@idallen.ca If you want to capture a terminal session, perhaps to email your instructor for assistance with debugging a problem, here's how to do it. If the session is small and fits in a (possibly scrolling) terminal window, you can use your mouse to left-click-drag over the text to select it, then start up a separate window and paste (middle mouse button) the text into an editor or into a "cat" command with output redirected to a file, e.g. "cat >session.txt". (If you paste into an editor such as VIM that auto-wraps text, you should turn off auto-wrap and auto-indent before you paste. In VIM use :set paste before you open up in input mode.) If the session is too long to fit in a terminal window, you can use the "script" command to save it into a text file: 1) Start a "script" session (man script) using my script cover and with output file "testing.txt": $ ~alleni/bin/script testing.txt This command will start a subshell (a nested shell) and will save your terminal command lines and output into the given file name. The script cover I wrote calls the standard "script" command with some environment options set to minimize escape sequences that clutter the script output file. 2) Perform your terminal session in this subshell. The output will be saved in the argument file name you gage, e.g. "testing.txt". Note: Your output file "testing.txt" will not contain the full results of your script session until you exit the subshell started by the script command. When you exit the subshell, script will flush the last lines of the session and will tell you the name of the output file. 3) Exit the script session subshell. Script will tell you the name of your script output file: $ exit Script done, file is testing.txt $ less testing.txt You may now examine your saved script session, edit it, mail it, etc.