![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| Sorting your data with msort | iBot | UNIX and Linux RSS News | 0 | 05-19-2008 11:20 AM |
| Sorting data and place them in different folders | Vinaykumar1 | UNIX for Dummies Questions & Answers | 29 | 05-14-2008 08:47 AM |
| Sorting blocks of data | alfredo123 | Shell Programming and Scripting | 8 | 07-05-2007 10:53 AM |
| Newbie Awk data sorting | i_am_a_robot | Shell Programming and Scripting | 5 | 05-04-2007 07:33 AM |
| Perl: Sorting an associative array | tine | Shell Programming and Scripting | 2 | 10-29-2003 04:11 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
The problem in the above code is in accessing the array elements. The array elements should be accessed as ${array[num]} Use the below code in your script, if (( ${element1[i]} > ${element1[j]} )) then temp=${element1[i]} element1[i]=${element1[j]} Regards, Chella |
|
|||||
|
thanks a lot dear.got it
very much thanks to u. hey can u also tell me how to blink a text in a file and contnue with the rest of the program. actually it only blinks and i cannot do the rest as i should wait for the blinking to stop can u show me a simple example in ksh |
|
||||
|
Ordinarily, yes, you would need to quote subscripted variables within braces "{ }" to protect the square brackets "[ ]" from the shell when accessing them. (You don't need to do this when setting them.) This should not be necessary inside the evaluation of double-parenthesis "(( ))". So the problem is not at line 31, but at 33, 34, and 35, using the syntax as suggested above. It just shouldn't be needed in the "if" clause.
You can blink text with "tput" if your terminal type supports blinking text. See the man page of tput for the correct options to use (i.e., I can't remember!) |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|