If it's the output of a program that you want to capture and parse, simply redirect (>
) it into a file
program_with_lots_of_output > output.log
and then parse it. Append a 2>&1
to that if you want standard error as well.
If you want a screen capture (i.e. including input), use the script program.