When more is passed a file whose contents can be displayed on one screen, it just writes the file's contents to stdout without pagination. If the file cannot fit on one screen, more paginates it.less has an option to quit if the file it is working with can be displayed on one screen (-F) and it has a more-emulation feature that behaves in a similar manner to the -F flag, but neither of these options seems to cause less to write the file's contents to stdout if the contents can fit on one screen.How can I get less to write a file's contents to stdout if the file's contents can fit on one screen and paginate the file as it normally would otherwise?
Making less print to stdout if an entire file can be displayed on one screen
less;more
Use less -FX. From man less:   -F or --quit-if-one-screen          Causes less to automatically exit if the entire file can be dis-          played on the first screen.   -X or --no-init          Disables sending the termcap initialization and deinitialization          strings  to  the  terminal.   This is sometimes desirable if the          deinitialization string does something unnecessary, like  clear-          ing the screen.