@SBT, thanks for contributing your script. I've done some bourne shell scripting, but I have yet to do bash scripting. Looking at your code, it seems like bash has some nice features.
@PageLab, thanks for the kind note. I am considering how to implement the request you asked for.