Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Romeu
  • Order by date
  1. Romeu

    GNU Awk memory allocation

    Thank you both for your input. Marsd, regarding your solution, I have a small concern. How would destroy(array) work? I've had some problems with the 'delete [array]' command in gawk (or the original awk method where you delete the array's elements one by one). They do not seem to deallocate the...
  2. Romeu

    GNU Awk memory allocation

    I'm having problems with a Gawk script that looks something like this: ----------------------------------------- while ( (getline < input_file) > 0 ) { # skip file header n_nr++ if ( n_nr < 3 ) continue summary_detail_array=$2&quot;|&quot;$3 summary_detail[summary_detail_array]+=$1...
  3. Romeu

    Join command

    Thanks anyway. From what Greg posted and what I've read, I believe the difference in my join and yours can be related to the global env LC_COLLATE. However I wasn't able to change it correctly. I ended up solving my problem by padding the join field with leading zeros, so it would have always...
  4. Romeu

    AWK performance

    Thanks for the info bigoldbulldog. I've also managed to redurce the run time by removing some &quot;hidden&quot; loops that were out of control. I've also tried gawk. For my script the improvement in performance was a whopping 260%!! I've also tried nawk, but the performance was very similar to...
  5. Romeu

    Join command

    Good thinking, but it didn't work either. Here is the sorted inputs (just the join field): 100000 100001 100002 100003 100004 100005 100006 100007 100008 100009 10000 100010 And the output: 100000 100001 100002 100003 100004 100005 100006 100007 100008 100009 100010 The &quot;10000&quot; is...
  6. Romeu

    Join command

    I was trying to join the two files by the first field ( I believe that's join's default option). The output should look like: [key field][rest of file 1][rest of file 2] For istance, the first line would be: 1|304500001||1|0|304500001|(...)|304500001|3|105|29563|(...) Thanks, Romeu
  7. Romeu

    Join command

    I'm trying to join this file: 1|304500001||1|0|304500001|(...) 2|304500002||2|0|304500002|(...) 3|304500003||3|0|304500003|(...) 4|304500004||4|0|304500004|(...) 5|304500005||5|0|304500005|(...) 6|304500006||6|0|304500006|(...) 7|304500007||7|0|304500007|(...) 9|304500008||9|0|304500008|(...)...
  8. Romeu

    AWK performance

    CaKiwi, Yes, after re-reading my own text I have to agree that your answer is the only one that makes sense. My fault, sorry. I forgot to explain properly that the more recent script is taking increasingly more time running, as I add more and more validations to each line, in a more or less...
  9. Romeu

    AWK performance

    In my earlier scripts, I could add a bunch of loops and arrays without a significant impact on run time. In other words, the most time consuming operation was to scan the file, and I could add more and more validations to each line with only a minor impact on performance (one script has more...

Part and Inventory Search

Back
Top