The result of curl -s http://127.0.0.1
is 200 OK
The result of /usr/bin/time -f "%e" curl -s http://127.0.0.1
is 200 OK0.08
In this case, I only need 0.08
. How can I only get 0.08
instead of the whole string when I redirect the output to >> result.txt
?
ps: the response can change in the future (not always 200 OK
), and the format of time can also change in the future. So I really need a solution that is not based on string manipulation. Thanks.