I don't like the output of more on HP-UX, so I use less instead as apager:PAGER=lessIts output is nice, but, on Linux, when I use man and then quit, Igo back to the shell, and the display looks just the way I left it,but on HP-UX, when I go back to the shell, there is a partial line left before the prompt, much like the following command produces:echo -e text \cLook at this:on HP-UX:user@hpux2:~$ man lsRiformattazione in corso. Attendere...user@hpux2:~$(the message in Italian means Reformatting in progress, please wait)on Linux:user@linux:~$ man lsuser@linux:~$How to solve this problem?
How to prevent HP-UX command less from messing up my prompt?
less;hp ux;more
The screen swapping is done with a terminal control code.  Such codes are documented under terminfo(5).  The two involved in the screen saving/restoring are typically smcup and rmcup.  The first turns on a special cursor addressing mode of the terminal (sm=set mode) and the second one turns it off.  Typically, these two will save the screen and restore it.If screen restoring isn't working, it's possible that those entries are incorrect for your terminal type.  You can print the contents of the current terminfo entry using the infocmp command.  You'll need to look at those entries (smcup and rmcup) and compare the escape sequences with your terminal manual to determine what they do.  Odds are your terminal is just slightly different from the one expected by the terminfo entry.