Re: "man" command made easy?
[I haven't been following most of this thread, but]
On Mon, Jul 16, 2001 at 10:59:23AM -0700, Paul Mackinney wrote:
| Night before last I ran 'find /usr/doc -name "index.html" >foo.txt' and
| then spent 2 hours adding links from foo.txt to my local home/start
2 hours!? Wow. Learn vi(m) or some other advanced editor. If you
have that foo.txt with each filename on its own line the following
will take very little time to create a web page of links out of it.
:%s,^(.*)$,\1">\1</a><br>,
:%s,^,<a href="file:///usr/doc/,
Then insert "<HTML><Body>" at the top and "</body></html>" at the
bottom.
Those vi commands say
(1) replace each line with itself followed by '">' followed by
itself followed by '</a><br>'
It will turn
texmf/latex/index.html
into
texmf/latex/index.html">texmf/latex/index.html</a><br>
(2) insert the link at the beginning of the line
texmf/latex/index.html">texmf/latex/index.html</a><br>
becomes
<a href="file:///usr/doc/texmf/latex/index.html">texmf/latex/index.html</a><br>
Becoming familiar with commands like that (and regexes in general) can
really be a time saver.
| page. I found answers to 3 random trivial questions that have been
| bugging me; I'll never regret spending the time on this.
Yeah, it is always good to find info you are interested in in the
documentation. It really helps (like learning commands like the
above).
HTH,
-D
Reply to: