So far so good. I took a quick look at the script and then ran it to see if it was working. Needed only to change the xml program var at the top (since I have xmlstarlet in my PATH already).

Then to clean it up I had to change the character encoding for all the data extraction to UTF-8. ASCII uses only the lower 127 characters and won't support any accents nor the "smart" single and double quotes which may be present in the source data.

The loop structure that was in my sample was temporary only and in the full source I also had one which would only loop as many times as there were entries in the source XML.

Do you have any idea why the other version would hang? Could it be because of many (repeated) external calls to the awk file I had created?

Again, thanks for the brilliant help. You did an amazing job with the cleanup of the script. I could just understand the basics of what was going on in the original script, but I have no experience with bash syntax, so this is hugely appreciated.

Now I'm going to start adding back in the original trailer and poster downloading code and at the same time try to apply the same type of cleanup to those parts so they match what you've done.

I'll send an update when it's done and after I verify everything is working correctly I'll post it all again for review and of course for anyone that wants to use it.
_________________________
Bruno
Twisted Melon : Fine Mac OS Software