|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
SELECT and wrapping to next column
Hi all, Am trying to write a menu driven script using SELECT and if I have more than 4 options, it wraps to the next column. That is if I have 6 choices, items 5 and 6 are in the second column. Is there any settings that control this behavior or is it due to some stty settings? stty -a output as below: Code:
speed 38400 baud; rows 38; columns 150; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0; -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8 opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke It does not wrap to the second column using KSH88 but on PD KSH v5.2.14 99/07/13.2, it does
|
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Let your lists be vertical and limitless using '\' Code:
$ echo 1\ > 2 1 2 $ |
| Sponsored Links | ||
|
|
#3
|
||||
|
||||
|
|
#4
|
|||
|
|||
|
True, I only use "for <var> in <list> ; do ... done" and even more often, being more robust and low latency, (parens needed in BASH) "(while read <vars> ; do ... done)", either with a pipe "echo <list>|tr ' ' '\12'|...." or a Here Document (great for managing lists one item per line) "... <<-!\n\tItem1\n\tItem2\n...\n!\n".
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Select record having different value in second column | Sanjeev Yadav | Shell Programming and Scripting | 6 | 05-17-2012 08:32 AM |
| select last column | mjomba | Shell Programming and Scripting | 3 | 03-05-2011 02:56 PM |
| to select according to the second column..!! | adityamitra | UNIX for Dummies Questions & Answers | 4 | 06-01-2010 10:59 AM |
| SQL select all but not if it is already in an other column | lowmaster | Shell Programming and Scripting | 6 | 02-14-2010 10:02 AM |
| select a column | alfreale | Shell Programming and Scripting | 2 | 06-16-2008 06:45 AM |
|
|