Thanks. I have since converted the awk to perl and incorporated the -e switch. I am still getting a syntax error that I can not figure out...
Although all my brackets 'match', I am getting a 'right bracket missing' message. If you care to help me out, I would like to e-mail you the script for you to look at, since I don't know anything about the code tags needed on this site to format the text inside this box.