[lug] Html to plain text

Michael J. Pedersen marvin at keepthetouch.org
Wed Jan 17 11:01:47 MST 2001


On Wed, Jan 17, 2001 at 11:34:54AM -0600, Carlos Hern?ndez L?pez wrote:
> Hello,
> 
> Does anybody know an easy way to convert html files to plain text files?

Technically, html files ARE plain text. However, if you mean you want to
remove the html formatting, here's an easy way to do it, assuming you have
perl:

perl -i.bak -p -e 's/<.*?>//ig' *.html

That will modify your original files, and remove a good 90% or more of the
formatting, and store the original files in the same name with a .bak
extension.

Hope this helps!

-- 
Michael J. Pedersen
My GnuPG KeyID: 4E724A60        My Public Key Available At: wwwkeys.pgp.net
My GnuPG Key Fingerprint: C31C 7E90 5992 9E5E 9A02 233D D8DD 985E 4E72 4A60
GnuPG available at http://www.gnupg.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20010117/b2f3786a/attachment.pgp>


More information about the LUG mailing list