The last two lines in my previous post, is really one line that got
cut off. So much for trying to post code.
Here's a link to a proper write up that containing a link to the file with the
code along with an explanation.
link
Here's a link to the shell script file
file