After a command in bash i want the execution time for that command redirect to file but not use time
before every command.
I try trap but I can't redirect trap output to file. I also try PROMPT_COMMAND; but this environment variable run after user command not before it.
What I mean:
$ nano Foo.txt
and in the log file or output (generally stdout):
nano Foo.txt: 14:38
(for instance)
I try use PS0 and PS1 but PS0 for bash version least 4.4 and my bash in workplace lower