Monday, March 27, 2006

How To:The whimsical stty...1..Erase by backspace key

The problem usually all newbie have faced that while writing a command wrongly in shell and then trying to rewrite it again.When you try to use backspace key or del key,junk characters starts coming.
To resolve it:

$stty erase [backspace]

Now lets talk more about stty.Infact you can check wat are the functions of your keys by this command:

$stty -a
speed 38400 baud;
rows = 24; columns = 80; ypixels = 0; xpixels = 0;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = ; eol2 = ; swtch = ;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
-parenb -parodd cs8 -cstopb -hupcl cread -clocal -loblk -crtscts -crtsxoff -parext
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc
ixon -ixany -ixoff imaxbel
isig icanon -xcase echo echoe echok -echonl -noflsh
-tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3


Here "erase" will be done by pressing ^[cntrl]? key.

Labels:

0 Comments:

Post a Comment

<< Home