simple question of back history (321 Views)
Reply
Super Advisor
admin1979
Posts: 241
Registered: ‎04-15-2009
Message 1 of 8 (321 Views)

simple question of back history


Hello,

How do you turn on the feature with which we can scroll through the previous commands by using UP ARROW Key?

Thanx,
admin
Honored Contributor
Steven Schweda
Posts: 9,096
Registered: ‎02-23-2005
Message 2 of 8 (321 Views)

Re: simple question of back history

Which is your shell? (Does it offer that
feature?)

man
Super Advisor
admin1979
Posts: 241
Registered: ‎04-15-2009
Message 3 of 8 (321 Views)

Re: simple question of back history

Its a KSH shell. I am going through the man ksh now.
Honored Contributor
Steven Schweda
Posts: 9,096
Registered: ‎02-23-2005
Message 4 of 8 (321 Views)

Re: simple question of back history

I don't know about ksh. GNU "bash" can do
it.

http://www.gnu.org/software/bash/
Honored Contributor
Honored Contributor
cnb
Posts: 1,197
Registered: ‎09-18-2008
Message 5 of 8 (321 Views)

Re: simple question of back history


For ksh I use:

# set -o emacs

Works just like VMS :-)

Rgds,
Super Advisor
admin1979
Posts: 241
Registered: ‎04-15-2009
Message 6 of 8 (321 Views)

Re: simple question of back history

That command did not work.
Honored Contributor
Honored Contributor
cnb
Posts: 1,197
Registered: ‎09-18-2008
Message 7 of 8 (321 Views)

Re: simple question of back history

>"That command did not work."

Not very descriptive.

Did you get an error?


Maybe you need to change your .profile?

Ours looks like this:

# @(#)$RCSfile: .profile.sh,v $ $Revision: 1.1.4.3 $ (DEC) $Date: 1999/03/30 20:14:46 $

if [ ! "$DT" ]; then
stty dec crt new
fi
PATH=/sbin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/bin/X11:/usr/local
export PATH
set -o emacs
PS1=`hostname`':$PWD> '
export PS1


if [ ! -f /usr/var/checklist.setup -a ! -f /usr/var/setup.notice ]; then
if [ -x /usr/sbin/setup -a "$DISPLAY" = "" ]; then
if [ "$TERM" = "" ]; then
TERM=vt100
export TERM
echo "** "
echo "** Your terminal type is unknown and is being set to a default of \"VT100\""
echo "** "
echo "\n\nPress RETURN to start system setup or Control-C to exit to shell."
read USER_INPUT
fi
date > /usr/var/setup.notice
/usr/sbin/setup
fi
fi
Server4:/>

We have several V5.1B-4 systems here and '# set -o emacs' works just fine for us.


Rgds,


Super Advisor
admin1979
Posts: 241
Registered: ‎04-15-2009
Message 8 of 8 (321 Views)

Re: simple question of back history

As mentioned above.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.