Operating System - HP-UX
1829523 Members
1759 Online
109991 Solutions
New Discussion

possibility in /sbin/sh shell

 
Badaim_1
New Member

possibility in /sbin/sh shell

Hello,

In bash shell, when we use TAB key, it "suggest" possible commands. Is it possible to set it in POSIX shell or ksh ?
5 REPLIES 5
Tim Nelson
Honored Contributor

Re: possibility in /sbin/sh shell

you can hit esc twice to autofill up to the next non unique char
James R. Ferguson
Acclaimed Contributor

Re: possibility in /sbin/sh shell

Hi:

No, the Posix ('/sbin/sh' or '/usr/sbin/sh') shell use ESC+ESC (Escape trice) to do filename completion.

By the way, do _NOT_ alter root's default shell as defined in '/etc/passwd'. To change it to anything other than '/sbin/sh' may lead to an un-startable server. You can, however, switch to a Bash shell manually if you like and define such by default for non-root users if that is a preference.

You can fetch a Bash binary from the Porting Center. Be sure to install all the run-time dependencies if you do:

http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.0.033/

Regards!

...JRF...
dirk dierickx
Honored Contributor

Re: possibility in /sbin/sh shell

there is some completion, mainly for files and directories available in other shells. however bash has the best completion possible. it does so much more then only files/dirs.

look up the 'bash completion' project for more info.
Michael Steele_2
Honored Contributor

Re: possibility in /sbin/sh shell

Hi

LOL - Jame's response is very good advice and one I did not follow many years ago, when at that time I created an unbootable box by doing just what James has stated, only with ksh.

I had to go into single user to fix the problem.

There are many such little fixes that an SA will perform only once and then never do again. Another is putting a file.old in rc.config.d or one of the rc dir.s, or just a special char. file name.

This, you will also only do once.
Support Fatherhood - Stop Family Law
T. M. Louah
Esteemed Contributor

Re: possibility in /sbin/sh shell

Quick tips:

To recall the commands that you have issued in HP-UX, change the shell to korn shell.
# ksh -o vi
Press ESC and K on the keyboard.
T+
Little learning is dangerous!