As you're using HP-UX:
First, `echo $SHELL` to see which shell you're using
1) In HP-UX, "sh" is the Posix shell, which supports command history in the same way as ksh
So esc-k should work by default, and then you can use ed/vi style command keys to edit the command line
If esc-k doesn't work, you need to set your environment: Type `set -o vi` and `set |grep HIST` to check that HISTFILE and HISTSIZE parameters are set
2) `history` or `fc -l`; `man sh-posix` and search the man page for the usage of the `fc` utility
2) Pipe the output to "pg", e.g. `ls -l |pg`; You can then page forward and backward through the test, search for specific test etc. `man pg` for more info