I Am Stumped, Please Help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting I Am Stumped, Please Help
# 15  
Old 05-20-2008
Thanks for the reply, if the pipe to sort and getline command won't work, is there another way to sort this for ouput?
# 16  
Old 05-21-2008
You already do, just don't redirect to a temporary file?
# 17  
Old 05-21-2008
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  
Old 05-22-2008
Gawk has functions for array sorting: asort() and asorti()
# 19  
Old 05-22-2008
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  
Old 05-22-2008
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  
Old 05-26-2008
still having issue's, can someone help with this?
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Stumped .. is this a command line arg?

I need a bit of explanation: LogFile=${LOGS_DIR}/${1}_$$ I know: - LOGS_DIR is an environment variable - $$ is the PID ... but what is ${1} ?? Is it another method to access a command line variable, or the job name? Thanks! Jon (3 Replies)
Discussion started by: jdorn001
3 Replies

2. Shell Programming and Scripting

Stumped on simple BASH Script

Hello All, First and foremost, if I have posted this question in the wrong forum/section, I apologize. Okay so here is my dilemma. I have written a BASH script that automatically restarts a tomcat on a given server. That part was simple enough. However, now I would like to not only restart... (14 Replies)
Discussion started by: UNM_Lobo
14 Replies

3. Shell Programming and Scripting

Command not found in shell script - stumped for 4 days

Hello, I like to begin with :wall:.. literally... It has been 4 days and I have no idea how to fix it. Environment - AIX 5.3 I wrote a script to call on ssh to log into another box via PKA to do something else. If I run the script on the terminal, it works 100%. If the SAP customised... (11 Replies)
Discussion started by: plonkagain
11 Replies

4. Shell Programming and Scripting

perl replace command, stumped!

Ok, I stole some code from a program that takess a hash of a password from PasswdMD5 and replaces it in the /etc/shadown file on a linux system. I run his program and it's fine. Well I took the same code and put it in another program that won't ask for prompgx and such and this code won't work:... (2 Replies)
Discussion started by: benefactr
2 Replies

5. Shell Programming and Scripting

Stumped

Hi, I'm pretty new to UNIX shell scripting and need some help. We have an Informatica interface that dumps any files that have errors into a directory. I need to check that directory for any of up to 9 files that might be in it and run a specific process for each file found. Here's what I... (3 Replies)
Discussion started by: JeffR
3 Replies

6. UNIX for Dummies Questions & Answers

RegEx question has me stumped

Hi All, I'm fairly new to Regular Expressions, and have made some decent progress, but this one has me scratching my head. I'm trying to match the class name in my scripts as shown in the examples below. Any ideas? Thanks! -Mark :: Looking for a regex to match the red text :: import... (7 Replies)
Discussion started by: tolmark
7 Replies

7. IP Networking

httpd.conf - stumped

Have been asked to remove all images from being logged to the access_log ... where am I going wrong?<VirtualHost 123.456.789.99> ServerName www.somedomain.com.au DocumentRoot /agents/tts Redirect /wap http://somewap.com.au/traveler LogFormat "%v %h %l %u %t \"%r\" %>s %b" comonvhost... (2 Replies)
Discussion started by: Cameron
2 Replies
Login or Register to Ask a Question