02-18-2004
How to delete a character
Hi,
T think this is a question for Perderabo.
If you think you know the answer you must be very good !
Most of us know how the make the <backspace> key backspace a character.
Now how do I make the <delete> key delete a character.
!! So when I press the delete key the character after my current cursor position gets deleted. !!
Running "stty erase ^?" makes the delete key performing a backspace.
Now what do I need to run to make the delete key delete.
Some background info might be that I use Midnight Commander for Unix. It has several types of terminals where I can define the erase function, etc.. However per default in a Unix dtterm the delete key does print a ^? or performs a backspace.
Hope it's clear and someone knows the answer.
Regs David
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi ! All,
I have to delete first 2 characters from string. How its possible?
Like string value is "2001". I required output as "01"
Plaese help me.
Nitin (4 Replies)
Discussion started by: nitinshinde
4 Replies
2. Shell Programming and Scripting
I built a 12 million record file and made a mistake, one field is 1 character too long.
The record is 40 bytes and ends always in 999. I am trying to delete the 37 character in each record. Is this possible without doing a cut and paste. (1 Reply)
Discussion started by: bthomas
1 Replies
3. Shell Programming and Scripting
Hello.
I'm next problem..
I'm a tmp file
$ cat tmp
word1
word2
word3
word4
and I like have
word1 word2 word3 word4
I try with:
$ cat tmp |sed 's/\n//'
word1
word2
word3 (2 Replies)
Discussion started by: ReneVielma
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a .txt and I need to delete the characters betwwen the 10th and 20th...
How can I do that...
I need to do somethink like these:
%s/I don't know how to define a range between 10th and 20th character//g
Can you help me...
If I want the 10 first characters i do this:... (2 Replies)
Discussion started by: nuno_fbo
2 Replies
5. UNIX for Dummies Questions & Answers
Hi,
For example, i have a string
"123 456 789 abc 111 222 333"
and I would like to delete all the characters before abc so that it becomes
"abc 111 222 333"
how can i do that in unix? using sed?
note: I actually don't know how many words/charachters before "abc", so the "cut"... (9 Replies)
Discussion started by: phandy
9 Replies
6. Shell Programming and Scripting
Friends, I'm looking for a command that delete the first tho caractere in a word. Here is an exp :
I want to replace "20091001" by "091001"
or "replace" by "place"
Thx, (13 Replies)
Discussion started by: newpromo
13 Replies
7. Shell Programming and Scripting
Hi all
I am trying to get my head around doing the following....
I have an input field that could contain either a number a blank field or a whitespace field.
What I want to do is delete a 0 (zero) if it's on its own or leading the number.
So:-
\t0 delete the zero
0 delete the... (8 Replies)
Discussion started by: Bashingaway
8 Replies
8. Shell Programming and Scripting
Hello
is there a way to delete all symbolic characters using the tr command
or delete everything apart from letters
for example
input="u;'#n]
i would like echo $input to be "unix"
or a way to only accept letters
PLEASE HELP:wall: (4 Replies)
Discussion started by: omaral
4 Replies
9. Shell Programming and Scripting
Hi there,
A total sed noob here. Is there a way using sed to delete everything before a character AND after another character on each line in a file? The deletion should also delete the indicating characters(here: an opening and a closing parenthesis).
The original file would look like... (3 Replies)
Discussion started by: bnbsd
3 Replies
10. Shell Programming and Scripting
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT MOJAVE
glutspecialfunc
glutSpecialFunc(3GLUT) GLUT glutSpecialFunc(3GLUT)
NAME
glutSpecialFunc - sets the special keyboard callback for the current window.
SYNTAX
#include <GLUT/glut.h>
void glutSpecialFunc(void (*func)(int key, int x, int y));
ARGUMENTS
func The new special callback function.
DESCRIPTION
glutSpecialFunc sets the special keyboard callback for the current window. The special keyboard callback is triggered when keyboard func-
tion or directional keys are pressed. The key callback parameter is a GLUT_KEY_* constant for the special key pressed. The x and y callback
parameters indicate the mouse in window relative coordinates when the key was pressed. When a new window is created, no special callback is
initially registered and special key strokes in the window are ignored. Passing NULL to glutSpecialFunc disables the generation of special
callbacks.
During a special callback, glutGetModifiers may be called to determine the state of modifier keys when the keystroke generating the call-
back occurred.
An implementation should do its best to provide ways to generate all the GLUT_KEY_* special keys. The available GLUT_KEY_* values are:
GLUT_KEY_F1
F1 function key.
GLUT_KEY_F2
F2 function key.
GLUT_KEY_F3
F3 function key.
GLUT_KEY_F4
F4 function key.
GLUT_KEY_F5
F5 function key.
GLUT_KEY_F6
F6 function key.
GLUT_KEY_F7
F7 function key.
GLUT_KEY_F8
F8 function key.
GLUT_KEY_F9
F9 function key.
GLUT_KEY_F10
F10 function key.
GLUT_KEY_F11
F11 function key.
GLUT_KEY_F12
F12 function key.
GLUT_KEY_LEFT
Left directional key.
GLUT_KEY_UP
Up directional key.
GLUT_KEY_RIGHT
Right directional key.
GLUT_KEY_DOWN
Down directional key.
GLUT_KEY_PAGE_UP
Page up directional key.
GLUT_KEY_PAGE_DOWN
Page down directional key.
GLUT_KEY_HOME
Home directional key.
GLUT_KEY_END
End directional key.
GLUT_KEY_INSERT
Inset directional key.
Note that the escape, backspace, and delete keys are generated as an ASCII character.
SEE ALSO
glutSpecialUpFunc, glutKeyboardFunc, glutMouseFunc, glutSpaceballButtonFunc, glutButtonBoxFunc, glutTabletButtonFunc, glutGetModifiers
AUTHOR
Mark J. Kilgard (mjk@nvidia.com)
GLUT
3.7 glutSpecialFunc(3GLUT)