On 8/18/21, hancooper via <help-bash@gnu.org> wrote:
> How can I use two time stamps and compute the elapsed time?
> I have a search command that I want to also compute the execution time
If it's one command run from the bash prompt, why not use time? eg:
$ time dd if=/dev/zero of=tempfile bs=1M count=100 oflag=sync
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 7.29611 s, 14.4 MB/s
real 0m7.354s
user 0m0.000s
sys 0m0.764s