1827390 Members
5634 Online
109964 Solutions
New Discussion

TAB Key

 
Yeaw Sing LAI
New Member

TAB Key

Hi,

Can anyone give some light to me:
In linux, if I have a long filename I can use a press on the TAB key and I can use the arrow key up/down to get the history key i have input.

My question is how can i use the same trick in hp-ux. I am very new to hp-ux. Can anyone help? Thanks.
4 REPLIES 4
Deoncia Grayson_1
Honored Contributor

Re: TAB Key

The trick you are looking for is escape k this will recall command line history
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Matti_Kurkela
Honored Contributor

Re: TAB Key

This is a function of a command interpreter (also known as a "shell").

In Linux, the default shell is usually "bash" which has a lot of features for interactive use.

In HP-UX, the default shell is /usr/bin/sh. It is a very basic shell with a limited set of features. "bash" does not come as standard with HP-UX, but you can install it as a separate package. If you are unable or unwilling to install additional software, you might want to learn "ksh". It has more features than the default shell, but it may not use the same keystrokes as "bash" to access them.

There should be a list of available shells at /etc/shells - if it doesn't exist, use "man getusershell" to get a list of standard system shells.

You can test any available shell by typing its name as a command. When logging out, first type "exit" to return to your default shell, then log out as normal.

As an ordinary user, you should be able to change your default shell using the "chsh" command. You must pick your new shell from the choices listed in /etc/shells (or the default list, as above).

"bash" is available on HP-UX Porting Archive:
http://hpux.cs.utah.edu/hppd/hpux/Shells/bash-3.2/
(pick the correct version for your architecture, and get also the packages listed as run-time dependencies)

For HP-UX 11i v2 (aka 11.23), bash is also available from HP as a part of HP-UX Internet Express package.
http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123

To get bash, you don't need the whole package, just the TC-OpenSource component is enough.
MK
Jannik
Honored Contributor

Re: TAB Key

If you have ksh/sh and configure the following in you .profile:
HISTSIZE=1000
HISTFILE=~/.sh_history
export HISTSIZE HISTFILE

you can do the following:
use "Esc Esc" for long filenames
the keys h j k l are the arrow keys in the vi editor used by sh and ksh. So to do scroll back use "esc k"
jaton
Yeaw Sing LAI
New Member

Re: TAB Key

After install the bash shell now those tab key is back. Thanks.