Remote 'man' with BBEdit
By admin on Monday, January 8 2007, 16:34 - BBEdit - Permalink
I frequently need to read manual pages from Suns and Linux systems, but prefer to read in BBEdit. Today's trick facilitates this, by grabbing the manual page from a remote machine via ssh, unformatting it with col, and dumping it into a BBEdit window (which doesn't ask to be saved).
function manb () { ssh $1 man $2 | col -b | bbedit -t "$2@$1" --clean --view-top }
Usage is "manb host command", so "manb www up2date" opens a window titled "up2date@www" with www's up2date manual page.
Comments
function manb () { ssh $1 man $2 | col -b | bbedit -t "$2@$1" --clean --view-top; }If you don't use BBEdit, but you have TextWrangler with the command line tool installed, you can change that into:function manb () { ssh $1 man $2 | col -b | edit -t "$2@$1" --clean --view-top; }And if you're, instead, a TextMate junkie:function manb () { ssh $1 man $2 | col -b | mate; }This last version doesn't show you a proper title, because the mate command line tool doesn't provide a flag for it…bashfunction -- they're obscure, but more flexible than aliases. juandesant: Interesting. I have the semicolon on another shell function, but this one works without it for me.