Re: ed2man: my newest quick hack

  • From: "Littlefield, Tyler" <tyler@xxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Sat, 14 May 2011 15:08:26 -0600

I've known bits and pieces of it for a long time, I just google the syntaxes that I need and go from there. It's a bit slow, but I've not had the motivation quite yet to sit down and learn bash.

On 5/14/2011 3:06 PM, Don Marang wrote:
Thanks.  Looks like you are picking up bash pretty well.


*Don Marang*
Vinux Software Development Coordinator - vinuxproject.org <http://www.vinuxproject.org/> There is just so much stuff in the world that, to me, is devoid of any real substance, value, and content that I just try to make sure that I am working on things that matter.
-- Dean Kamen

On 5/14/2011 4:33 PM, Littlefield, Tyler wrote:
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.”

Other related posts: