The "script" command will capture *everything* written to
the screen. To capture interactive output just say "script"
and it'll tell you where the session log is being stored
(usually in the /tmp dir) or you can specify the name thus:
script yourSessionLogFileNameHere
...and if you want to capture the output of a specific command
then you can specify that as well:
script -c yourCommandHere yourSessionLogFileNameHere
...and if you want to capture the output of several commands
then mention them in a shell script and specify that, instead:
script -c yourShellScriptHere yourSessionLogFileNameHere
Note that the output will contain *everything* emitted during
your session so you may have to filter out some stuff like escape,
backspace and carriageReturn characters that you might not have
expected to find. Also, be aware that the script command spawns
a new instance of your shell to do its work so if you're running
interactively you'll need to exit that instance of the shell before
you can process the log file. And it's generally a bad idea to
cat the log file while the script session is live as that just
causes it to be endlessly added to its own log file... ;->