On Sun, Feb 6, 2011 at 1:07 PM, Michael Witten <mfwit...@gmail.com> wrote: > On Sat, Feb 5, 2011 at 20:02, Michael Witten <mfwit...@gmail.com> wrote: >> So, if you run `history', you'll not only get the commands in the >> history list, but you'll also get the time at which the commands >> were last run (formatted according to "$HISTTIMEFORMAT"). >> >> In other words, it's not helpeful in this case. > > Of course, I suppose bash could be taught to build multi-line comments > from command lines that share the same timestamp, but given the nature > of how that information is recorded, it seems like it may not be a > very robust solution. >
You don't have to do that - the timestamp is encoded in a "comment" line between entries. See the example below. One could simply assume all lines between two lines beginning with # are part of the one entry, #1296950290 pwd #1296950293 bash -version #1296950327 for i in 1 2 do echo $i done #1296950337 jon.