referencing a specific item in a man page

1 view
Skip to first unread message

Robert Citek

unread,
Jun 17, 2011, 2:07:17 PM6/17/11
to CWE-LUG
What tricks do folks use to reference a particular item in the man page?

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

Reply all
Reply to author
Forward
0 new messages