Is there a way to run all commands in bash as if they were invoked with time in front? I want that I could type $ some_command and this will actually invoke $ time some_command.
1 Answer
Itself time command do it :
time ls
time gimp
But if you want to invoke time for each command, you can customize a script for yourself,
you should run everything with it but it's not good way.
-
My question is exactly how this script should look like... It would be really nice to be able to turn on and off this script.Dror– Dror2013-09-23 15:53:47 +00:00Commented Sep 23, 2013 at 15:53
-
I think Stephane Chazelas answer better than me...PersianGulf– PersianGulf2013-09-23 19:10:49 +00:00Commented Sep 23, 2013 at 19:10
zsh, it's just a matter ofREPORTTIME=0(report time of those processes that take more than 0 seconds).bash. I don't think I'll change my shell just because of this feature.