I have a program that I am timing, lets say some_bin
. I run the time command and it produces output like so:
time -p some_bin --some-args=args
real 1.09
user 1.08
sys 0.00
I want to get just the 1.09 real time the program was in use. I'm trying to use awk in this case to pattern match the first line on real
and then extract the time.
Everything I've tried thus far however has failed to work. Any ideas on how I can accomplish this?