![]() |
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 |
| help... no idea what to use | dakid | Shell Programming and Scripting | 4 | 03-06-2008 12:57 AM |
| using case to do this might be a bad idea? | Skyybugg | Shell Programming and Scripting | 12 | 04-06-2007 02:19 PM |
| any good idea on this? | fedora | Shell Programming and Scripting | 7 | 09-29-2006 03:36 PM |
| an idea? /var/adm/message | pressy | UNIX for Advanced & Expert Users | 3 | 08-19-2003 07:04 AM |
| Dual Boot a good idea? | PravusMentis | UNIX for Dummies Questions & Answers | 8 | 07-18-2001 03:02 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Limitations of awk? Good idea? Bad idea?
Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts..
I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600 records, with 30 fields. Since I want to be able to cross-reference one record against all other records multiple times for different/specific records that need to be checked (for example if a record orders an amendment to a previous record, I'd like to check to see if the previous record still exists), and since, I think, awk only runs through each record once, I wanted to know if it's possible, and if so, if it's even a good idea to store all the fields from each record that I need (I don't need all of them, just maybe a third of the information) into an array in awk, and then return the array itself, outside of awk. Possible? Good idea, bad idea? I'm open to all suggestions and advice. Note: I don't know if it's possible to run the loop for each record again once you're in the awk program, for example: a nested awk where in the middle of the loop for the host awk, you can start a second awk to check the current record in the original awk against all other records. |
|
||||
|
Sorry about the lengthy thread, I usually try to make my inquiries with as much detail as possible to avoid confusion but half the time I guess I achieve the opposite.
Yes, you understood my thread perfectly. And yes, I think that will be enough for what I wish to do now. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|