Using backspace in solaris - help

Hi

In solaris if i have to delete something from shell i need to use ctrl+H, coz if i use backspace it shows ^?. Can any one please tell me how to set backspace key so that i can delete any character directly instead of using Ctrl+h.

Second Q is like in linux for going to recent command, i use up key, wat about solaris, how can i get to last command used & if it is using any combination. can i set it to UP key like in linux.

Similarly for tab key, as i have to use Esc key in solaris

Thanks for your help in advance

Sarbjit

The default shell in Solaris is "sh". In most linux distributions it is "bash" which has a history function with up an down keys.

so for you first question just enter:

stty erase ^?

to have backspace on the "backspace" key.

for the second one enter:

bash

to use the bash shell.

stty erase ^?

In other words type:
stty<spacebar>erase<spacebar><backspaceTab>
you can also add the code in your .profile...

Thanks 4 ur reply

When i use stty erase ^?, it shows No match & i am still facing same problem.

---------- Post updated at 02:35 PM ---------- Previous update was at 02:33 PM ----------

Thanks for your reply , Itz working

2 times the same answer... only one is working? strange...

Actually if i type ^? instead of using backspace key, then its not working.

But if i am adding this to my .cshrc file, it is not setting it because i dnt have admin rights to access .profile. Any views for that?

you told the backspace key was giving ^? as output... so it should be clear what ^? means?

the .profile should be in your homedir and you can access this. sure you can't access the root .profile but this is not necessary! just edit YOUR .profile or if you use csh edit .cshrc file...

i was unable to find .profile. So i have edited .cshrc like

if (`uname` == SunOS) then
stty erase ^?
endif

But when i launch new terminal and login into any solaris machine it is not setting it .

what is the output of "echo $0" in your login shell?

It says
csh

You need to fix the terminal emulator you use for it to sent the correct character when you press backspace. If you are using gnome-terminal, you can go to the profile preference menu, then to the compatibility tab:

Set "Backspace" to send "Control-H" and "Delete" to send "ASCII DEL", as they should always do.