| Date: Wed, 17 Aug 2005 14:37:37 +0100
| From: "John P. Looney" <valen at tuatha.org>
|
| This is a trick7y one, that slightly hurts my head. I'm wondering
| is there an easy way that I don't know of, to solve this:
|
| I have a text file, with zero or more patterns like:
|
| send an email to 'Looney' <email at domain.com> and tell him about it.
|
| I'd like to replace 'Looney' with <a href="thing?Looney"> and
| email at domain.com with a href="mailto:email at domain.com".
which would produce:
send an email to <a href="thing?Looney"> <a href="mailto:email at domain.com"> and tell him about it.
assuming that is supposed to be legal HTML, it is not.
where do the </a>s go?
also, what <a href=...> text is inside the anchor </a>?
finally, is the “thing?” part of the 1st href the same
for all Looney's? (I understand each line may have a
different Looney and email at domain.com, correct?)
it _looks_ like a job for sed(1), probably a 1-liner, as
soon as we understand what it is that is to be produced.
cheers!
-blf-
--
Experienced (20+ yrs) kernel/software Eng: | Brian Foster Montpellier,
• Unix, embedded, &tc; • Linux; • doc; | blf at utvinternet.ie FRANCE
• IDL, automated testing, process, &tc. | Stop E$$o (ExxonMobile)!
Résumé (CV) http://www.blf.utvinternet.ie | http://www.stopesso.com
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!