Is is possible to print the execution time of a shell command with following combination?
root@hostname:~# "command to execute" && echo "execution time"
Is is possible to print the execution time of a shell command with following combination?
root@hostname:~# "command to execute" && echo "execution time"
Adding to @mob's answer:
Appending
%N
todate +%s
gives us nanosecond accuracy:In zsh you can use
In bash or zsh you can use
These (by different mechanisms) force an external command to be used.