1833401 Members
3322 Online
110052 Solutions
New Discussion

Shell

 
SOLVED
Go to solution
Bona_1
Frequent Advisor

Shell

Hi all,
is there anyway at all that I can get HPUX to respond to backspace? Is there something I can do to the shell? Perhaps install a new shell
9 REPLIES 9
Stefan Farrelly
Honored Contributor
Solution

Re: Shell

do this command;

stty erase

This then sets your terminal settings to respond to your backspace key.

stty -a should show;

speed 9600 baud; line = 0;
rows = 30; columns = 102
min = 1; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U


Note erase shows as a CTRL-H so if your backspace key is not repsonding you can do stty erase CTRL-H
Im from Palmerston North, New Zealand, but somehow ended up in London...
James Murtagh
Honored Contributor

Re: Shell

Hi Bona,

I think you're looking for the ERASE setting on your terminal. for example :

# stty ERASE

See "man stty" for a full description.

Cheers,

James.
Bona_1
Frequent Advisor

Re: Shell

Thanks. It's working now. Is there any way I can enable "scrolling" of my previous commands?

Thanks
Pete Randall
Outstanding Contributor

Re: Shell

Bona,

How are you connecting to HP-UX? Is this via a terminal emulator? If so, there may be other considerations other than just setting "stty erase". WRQ's ReflectionX product, for one, needs to have the Keyboard Settings option "Backspace key sends delete" set to off.


Pete


Pete
Stefan Farrelly
Honored Contributor

Re: Shell

To scroll previous commands you need to do;

1. export HISTFILE=$HOME/.sh_history
2. set -o vi

You usually put these in your .profile so when you login they run.

Now you can use ESC K to scroll back or ESC / to search for previous commands.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Bona_1
Frequent Advisor

Re: Shell

For some strange reason, my vi editor isn't working well, it keeps giving me some gibberish
(a24y0Cs1A".profile" 51 lines, 1052 characters a0y0C# @(#)B.11.11_LRa2y0C# Defaul
# Be sure that VUE does not invoke tty commandsa15y3Cif [ ! "$VUE" ]; thena17y3C
# Set upfia0y0Ca24y0C".profile" 51 lines, 1052 charactersa0y0C)

Does anyone have any idea what is happening at all?

Thanks
Sorry for cramming all these requests into one single question
Pete Randall
Outstanding Contributor

Re: Shell

What is your TERM value set to? Try "export TERM=HPTERM" and see if that helps your vi problem.


Pete


Pete
Stefan Farrelly
Honored Contributor

Re: Shell

vi needs to know what terminal you are using so set it to;

TERM=dtterm

or if vi is still screwed try TERM=vt100 or TERM=hp (if you are using an hpterm)
Im from Palmerston North, New Zealand, but somehow ended up in London...
Pete Randall
Outstanding Contributor

Re: Shell

Sorry, make that "export TERM=hpterm"



Pete


Pete