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 Mike Lewis 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: marm1
  • Order by date
  1. marm1

    Display consumer/service line with smallest time value

    Thank you mikrom. Your solution is a clean and simpler approach to the problem posed. A big thank you once again - excellent coding.
  2. marm1

    Display consumer/service line with smallest time value

    Sorry, my description of the new requirement was poorly explained. The new objective it to get the consumer/service pair with the lowest time value ($4) and associated token ($3). I have the correct result however I have done so via accidentally introducing a typo. Is someone able to explain...
  3. marm1

    Display consumer/service line with smallest time value

    If there was a further field with a token value, is there an easy method to retrieve the entire line? I am interested in the token associated with the consumer/service pair with the smallest time value. For brevity, I have supplied a subset of data. $1 consumer $2 service $3 token value $4...
  4. marm1

    Display consumer/service line with smallest time value

    Thank you Mikrom for your excellent advice.
  5. marm1

    Display consumer/service line with smallest time value

    Many thanks for your assistance Mikrom. Great approach to the problem. $ cat get_min_time.awk BEGIN { FS="," } { key=sprintf("%s_%s", $1, $2) if(!min_time_value[key]) { min_time_value[key] = $3 } if(min_time_value[key] > $3) {...
  6. marm1

    Display consumer/service line with smallest time value

    Hello All, I have a file with three fields delimited by a comma: field1 is a consumer name field2 is the service used by a given consumer filed3 is a time value I would like to display the line for each consumer/service pair with the earlier time i.e. smallest time value Sample input file: $...
  7. marm1

    List of tuples issue

    Thank you @mikrom. You are quite right. I should have provided more background and context to this task. This task is the final part of a larger piece of work. The 'factorPotency' list has already been pre-sorted by a routine by the second data-pair item (the numeric). The final outstanding...
  8. marm1

    List of tuples issue

    Hello, I got the required result via the below routine. I am intrigued by the suggested dictionary approach. If someone could attempt the dictionary method I would be grateful to further my learning. @xwb thanks for your response. factorPotency = [('chain', 100), ('compound', 100)...
  9. marm1

    List of tuples issue

    Greetings, I have a series of lab label/factor pairs in a list of tuples. I need to work through the factorPotency list retaining the label/factor pairs with the highest factor value in the event of duplicate label names e.g. 'chain'. Could someone assist with this query? factorPotency =...

Part and Inventory Search

Back
Top