![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stumped | JeffR | Shell Programming and Scripting | 3 | 05-30-2008 06:01 PM |
| RegEx question has me stumped | tolmark | UNIX for Dummies Questions & Answers | 7 | 08-18-2007 03:20 PM |
| httpd.conf - stumped | Cameron | IP Networking | 2 | 04-25-2002 02:31 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#15
|
|||
|
|||
|
Thanks for the reply, if the pipe to sort and getline command won't work, is there another way to sort this for ouput?
|
| Forum Sponsor | ||
|
|
|
#16
|
|||
|
|||
|
You already do, just don't redirect to a temporary file?
|
|
#17
|
|||
|
|||
|
era,
You are correct. If I don't output to a file the indices output in sorted order and only the indices are output. But that is not the end result I was wanting. I was hoping that sorting the indices and assigning in a different array, I would be able to output the indices and the elements in sorted order, but as you can see above it does not work. I was thinking that awk outputted the indices in the order they were assigned, but that appears to not be the case. Still stuck on this one, still hoping someone can help me out with it. |
|
#18
|
||||
|
||||
|
Gawk has functions for array sorting: asort() and asorti()
|
|
#19
|
|||
|
|||
|
Or change the output format and/or the sort command line so that it does sort them into the right order. One common hack is to add a field to force a particular sort order, then in the end game throw away that field again.
|
|
#20
|
|||
|
|||
|
Ygor,
Gawk is not a option for me on this one. Thanks for the info. era, thanks. I will give that a try, but I am a little confused on how to do it with the indices that I need to sort, but will give it a try none the less. |
|
#21
|
|||
|
|||
|
still having issue's, can someone help with this?
|
|||
| Google The UNIX and Linux Forums |