![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| equivalent of backspace in ksh | solaix14 | Shell Programming and Scripting | 2 | 03-30-2009 07:35 PM |
| Control + h and Backspace | martinp973 | UNIX for Dummies Questions & Answers | 1 | 10-06-2008 10:37 AM |
| Backspace stty inconsistency | Runrig | HP-UX | 1 | 06-30-2008 10:40 AM |
| Cannot backspace on my session in CRT | rooh | UNIX for Dummies Questions & Answers | 2 | 07-08-2004 12:09 PM |
| Backspace Not Working in Script | Atama | Shell Programming and Scripting | 4 | 04-26-2002 11:17 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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... Code:
speed 38400 baud; rows = 42; columns = 162; ypixels = 0; xpixels = 0; csdata ? eucw 1:0:0:0, scrw 1:0:0:0 intr = ^c; quit = ^\; erase = ^h; kill = ^u; eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>; 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 And the backspace key works just fine outside the script. How can I make the backspace key work from the script as well? Code would be something like this for example... Code:
#!/bin/ksh echo "What is your name?" read name echo $name Thanks! |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|