4

I'm using ksh on unix and connect through putty.

My .sh_history stores all history commands but when I press up arrow nothing comes, please help me.

3 Answers3

2

It happened to me, when I'd press any arrow key some strange characters would come when i connect to a remote machine using putty. I don't know why it happened but the remedy is, you have to type the following in the command line.

$ stty -erase backspace enter

i dont remember what is the prompt of ksh($ or #)

EDIT: i found this link,hope this helps:

Make Arrow and delete keys work in Korn shell Command line

A. K.
  • 665
0

set -o emacs should do the trick. The default config doesn't set the editing mode.

0

Pretty sure the up arrow is a function of bash rather than history (ie: if you have history enabled in ksh or csh it won't work..)

You can either type "bash" once you connect or change the default shell of that user to /bin/bash

Duane
  • 196