How to time stamp history list in bash?
This was something on my to-do list for a while. Well, I've just doneQuote:> How to time stamp history list in bash?
I haven't made a release for this yet as this is all a bit
new. However you can compile this from CVS sources:
The format of the timestamp shown in a command history is controlled
by the $HISTTIMEFORMAT environment variable via strftime; the default
value is '%a %T ' (abbreviated weekday name and 24-hour time with
seconds). Note the trailing blank. See strftime(3) for a list of time
Also note that if you run the regression tests as I generally do,
depending on when you run this, some tests involving history checking
may fail. At present I haven't updated the tests to reflect the fact
that the time is by default printed in the history list.
Is there a way to time stamp each history list entry
returned by the "history" built-in command? I have
this feature in tcsh, but no mention of how to get
the same effect in the bash man pages.