For example, I was talking with someone about how to modify their bash
history to include a date/time stamp. Referencing something in the
bash man page is a challenge as it is about 4,000 lines long with many
items repeated, especially things like "see FOOBAR above/below". I
used this to reference that item:
$ man bash | less -iXN +/HISTTIMEFORMAT
That looks kludgy, but it works. Referencing "SHELL BUILTIN
COMMANDS' wasn't so easy. I ended up just using the line number:
$ man bash | less -iXN '+2155G'
Any other solutions?
BTW, I use this in my ~/.bash_profile:
export HISTSIZE=50000
export HISTFILESIZE=$HISTSIZE
export HISTTIMEFORMAT='%t%F %T%t'
Regards,
- Robert