ed2man: my newest quick hack

  • From: "Littlefield, Tyler" <tyler@xxxxxxxxxxxxx>
  • To: vinux-support@xxxxxxxxxxxxxxxx, programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 14 May 2011 14:33:29 -0600

Hello all:
I got kind of tired of messing with my client and it's weird issues with manpages, cutting off the top when I page with the pager, etc etc. So, I give you ed2man (which should actually be man2ed, but I'm already stuck on writing e2m.
Just pop this in your .bashrc file and you should be set, enjoy!
function e2m
{
if [ $# -ne 1 ];then
echo "Syntax: e2m <manpage>"
return
fi
tmpfile=$(mktemp)
if ! man "$1"> "$tmpfile";then
rm -rf "$tmpfile"
else
ed "$tmpfile"
rm -rf $tmpfile
fi
}


--

Take care,
Ty
my website:
http://tds-solutions.net
my blog:
http://tds-solutions.net/blog
skype: st8amnd127
“Programmers are in a race with the Universe to create bigger and better 
idiot-proof programs, while the Universe is trying to create bigger and better
idiots.  So far the Universe is winning.”
“If Java had true garbage collection, most programs would delete themselves upon 
execution.”

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: