[Techtalk] New to the list...new to linux

Sean McAfee mcafee at transmeta.com
Sun Oct 7 18:09:57 EST 2001


I'm jumping into this thread a bit late, but I wanted to share a tip that's
helped make it a lot easier to look at Unix man pages.

I have the following shell function defined in my .bashrc file:

getman() {
    local tmpfile=/tmp/getman-${!#}
    man "$@" | sed 's/.//g' > $tmpfile && vim $tmpfile; rm -f $tmpfile;
}

(That "^H" isn't two separate characters, but a single control-H character;
you can type it in vi/vim in insert mode by typing control-V control-H,
or in Emacs by typing control-Q control-H.)

Now I can type, for example, "getman xterm" or "getman 2 read", and the man
page will be brought up in my editor, stripped of annoying formatting
codes.  I can then easily search for a particular feature of interest.


--Sean




More information about the Techtalk mailing list