I am outputting the results of a timed executable to a file that has run 10 times. I have all the times in a file, and I need to find the best, worst, and average user times from this file. I was thinking about using a combination of awk to print the first column, but I am unsure how to strip "user" from the line so I can sort it numerically.
Also, I would need to get rid of the even rows, since they have information about the inputs and outputs and things that don't matter to these calculations. A sample of the time file is below:
1.12user 0.00system 0:01.12elapsed 99%CPU (0avgtext+0avgdata 5408maxresident)k
0inputs+0outputs (0major+398minor)pagefaults 0swaps
Does anyone have any idea of how I would do this?
Any help would be appreciated! Thank you.