When using the less pager, the contents can be saved to a file by using the command: -o <filename>.
-o <filename>