How can I output the real time a command takes (and nothing else)?
Example:
This won't work:
$ time -p sleep 2 | grep real
real 2.00
user 0.00
sys 0.00
I want something like:
$ print-real-time sleep 2
2.00
|
How can I output the real time a command takes (and nothing else)? Example: This won't work:
I want something like:
| |||
|
feedback
|
|
You need to capture the output of | |||||||||||||
feedback
|
|
A non-BASH-specific solution (explicitly use
Depending on the delicate nature of whatever you feed this output to you may want to redirect the output of your subject command to /dev/null... | ||||
|
feedback
|
|
Here's a hacky solution using
You can also use
| |||||||||
feedback
|