Using backspace in solaris - help


 
Thread Tools Search this Thread
Operating Systems Solaris Using backspace in solaris - help
# 1  
Old 09-01-2009
Error 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
# 2  
Old 09-01-2009
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:
Code:
stty erase ^?

to have backspace on the "backspace" key.

for the second one enter:
Code:
bash

to use the bash shell.
# 3  
Old 09-01-2009
Code:
stty erase ^?

In other words type:
stty<spacebar>erase<spacebar><backspaceTab>
you can also add the code in your .profile...
# 4  
Old 09-01-2009
Quote:
Originally Posted by DukeNuke2
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:
Code:
stty erase ^?

to have backspace on the "backspace" key.

for the second one enter:
Code:
bash

to use the bash shell.
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 ----------

Quote:
Originally Posted by vbe
Code:
stty erase ^?

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

Thanks for your reply , Itz working
# 5  
Old 09-01-2009
2 times the same answer... only one is working? strange...
# 6  
Old 09-01-2009
Quote:
Originally Posted by DukeNuke2
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?
# 7  
Old 09-01-2009
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...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

[SOLVED] Backspace not working!!!!!

Hi friends, Hope u r doing well. It is a very strange problem that I've never faced when I used linux or freebsd. When a type a command in Solaris 10, and if I make a mistake, the backspace doesn't work, when I press the backspace key three times forexample, this is what I get, ^H ^H ^H. The same... (2 Replies)
Discussion started by: gabam
2 Replies

2. Shell Programming and Scripting

echo backspace

Hello Forum: I am trying to find a meaning to this echo escape character: echo -e "\b" Can someone tell me or give me examples of the effect that this has when used. I know that \b is the backspace, but I cannot visualise it use like any other escape such as: echo -e "\n" Thanks. --Willie (10 Replies)
Discussion started by: willie
10 Replies

3. UNIX Desktop Questions & Answers

backspace in vi search

Hi gurus, i use vi editor. when I want search something I Type / (or ? if i want search backward), that is OK. But when i make mistake in searching string how can i delete character ? I tried bacskpase but did not work (gives just strange characters). Also tried shift+bacskspace but this only... (3 Replies)
Discussion started by: wakatana
3 Replies

4. UNIX for Dummies Questions & Answers

how to test for backspace

Hi all, I am using a script which is as follows: It reads a character. I want to check if the character is a backspace character or some other character. read -n 1 x if ; then echo "backspace detected" else echo "some other character" fi Thanks in advance. (1 Reply)
Discussion started by: anandkumar
1 Replies

5. Shell Programming and Scripting

Backspace Key From Within Script

I have a script that asks a user for a few question. I would like the users to be able to use the backspace key if they make a mistake. Right now when they try they get ^? instead of it backing up. As you can see here from a stty -a the backspace is set... speed 38400 baud; rows = 42;... (2 Replies)
Discussion started by: LRoberts
2 Replies

6. Shell Programming and Scripting

equivalent of backspace in ksh

Hello All, What would be the equivalent of backspace key in the korn shell. My scenario is: I am trying to install a product..and it comes out with a Licence Agreement screen, When I manually enter backspace key..I am able to get out of the whole agreement message to a point to type Agree A) or... (2 Replies)
Discussion started by: solaix14
2 Replies

7. UNIX for Dummies Questions & Answers

Control + h and Backspace

Hello, I am a UNIX newbie. With that out of that way.. In order to delete a mistyped character, I need to press control+h to move the cursor to the left, and then overwrite it. If I try hitting the backspace key, it just brings me to a new prompt. Is there a way to change it so that my... (1 Reply)
Discussion started by: martinp973
1 Replies

8. HP-UX

Backspace stty inconsistency

I have this in my .profile: stty erase `tput kbs` which sets erase to ^H for a vt and ^? for an xterm. This has been fine up until now on all systems whether I login using a vt terminal emulator or an xterm. On this new system though, if I log in directly using an xterm, backspace doesn't... (1 Reply)
Discussion started by: Runrig
1 Replies

9. UNIX for Dummies Questions & Answers

Backspace erasing the prompt

My AIX has Korn Shell. I had set the prompt by providing assigning to PS1. If on the prompt I use backspace it erase the whatever appeared due to PS1. Can someone tell me how to forbid this erasing of prompt string, with this behaviour? Thanks in advance. (4 Replies)
Discussion started by: videsh77
4 Replies

10. UNIX for Dummies Questions & Answers

Cannot backspace on my session in CRT

Hi, when I make a mistake and then try to backspace I am unable to do so . Can someone please suggest How I can correct this on my session For Eg: pwd^H^H^H Thanks rooh (2 Replies)
Discussion started by: rooh
2 Replies
Login or Register to Ask a Question