Thank you all
Here is a summary of how it all went.
1. Roger Barnes: Can you not simplay add \l (force next element to lowercase) in your replacement?
Yes - its works fine. My version of sed is the GNU one 4.1.2. The /l works perfectly. Its not mentioned in the man pages for sed but it is mentioned in the info pages which I abhor :-)
3. Daniel Bush
Suggested a perl script:
cat titles.html | perl -ne 'm/\.html">([^,]{1,}),/; $name=lc($1); $_ =~ s/\.html">/\.html#$name">/; print "$_";'
Yep that worked too. I tend to use perl for web stuff and don't do enough one liners like the above. It's neat.
3. Tatsuo Sekine
Suggested to grab the letter, then transliterate (what a wonderful word) it using y/[A-Z]/[a-z]/, then append it to the end of this thing called hold space with a H and then swap the contents of the hold apace and the pattern space using the x (exchange operator).
Well I have certainly learn something there :-)
Oh it worked fine too.
Caveats: In the html authors file there were some hyphenated names like Aldrich-Wright and some names with blanks like De Deckker. Each of the above methods, coupled with my the regex I use results in a few things to fix manually, but its only about 6 to do.
In the titles file there was one author per table row and
cat titles | grep '<tr>' | wc -l
showed there were 541 rows.
You have saved me hours of work and I have some sed and perl snippets to save away in my HTML help file I :-)
Thanks all.
-- Michael Lake Chemistry, Materials & Forensic Science, UTS Ph: 9514 1725 Fx: 9514 1460 [pls ignore idiot lawyer's msg below]
-- UTS CRICOS Provider Code: 00099F DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not read, use, disseminate, distribute or copy this message or attachments. If you have received this message in error, please notify the sender immediately and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the views the University of Technology Sydney. Before opening any attachments, please check them for viruses and defects. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html