There is no straight forward way to compare the backspace.But there are some other way like ,converting the character to ascii value and compare that with particular ascii value of the backspace.
ascii value of the backspace is 8.But when I print the ascii value of backspace in my system it prints 127.it is the ascii value of DEL.So I used 127 in my code.You just change that value to 8 if needed.
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)
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)
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)
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)
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... (10 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
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)
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)
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
LEARN ABOUT MINIX
bsfilt
BSFILT(1) General Commands Manual BSFILT(1)NAME
bsfilt, colcrt - a colcrt-like backspace filter
SYNOPSIS
bsfilt [ - ] [ -U ] [ file ... ]
DESCRIPTION
Bsfilt filters backspace sequences from the input file(s) (standard input if none) in an approximation of colcrt(1). Both the backspace
and the character it returns to are removed, unless they form an underline sequence. Underline sequences are treated according to the set-
tings of the - and -U options.
OPTIONS
- specifies that no underlining of any kind is to be propagated. Without this option or the -U option, bsfilt approximates underlin-
ing with minus signs (`-') in following lines.
-U specifies that underlining with underscore (`_') and backspace (`) character sequences is permitted.
SEE ALSO cawf(1), colcrt(1) and nroff(1).
DIAGNOSTICS
Diagnostic messages are delivered to the standard error file.
HISTORY
Vic Abell of Purdue University wrote bsfilt to have a backspace filter for cawf(1) that is independent of licensed source code.
BUGS
The maximum length of a line that can be underlined with minus signs is fixed.
Bsfilt does not examine the characters that are being overprinted via backspace operations. Thus, overprinting that is intended to form a
new character from several different ones is ineffective and only the last character of the sequence is propagated - e. g., ``o^H+'',
intended to look like a bullet, is reduced to `+'.
February, 1991 BSFILT(1)