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:
Desired output:
Any assistance would be greatly appreciated. Thanks in advance.
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:
Code:
$ cat data
arx-count-consumer,arx-count-service,300
arx-count-consumer,arx-count-service,500
peg-if-consumer,peg-if-service,1100
tin-mock-consumer,tin-mock-service,1500
arx-count-consumer,arx-count-service,101
tin-mock-consumer,tin-mock-service,4500
pipe-mock-consumer,pipe-mock-service,50
pipe1-mock-consumer,pipe-mock-service,510
Desired output:
Code:
arx-count-consumer,arx-count-service,101
peg-if-consumer,peg-if-service,1100
tin-mock-consumer,tin-mock-service,500
pipe-mock-consumer,pipe-mock-service,50
pipe1-mock-consumer,pipe-mock-service,510
Any assistance would be greatly appreciated. Thanks in advance.