It is fine to keep the relics :-)
I used that more as an exercise about how to do it in modern bash.
If one can find a shorter one, or a faster one, would be nice to know :-)
thats how I learn bash, by looking others examples... reading the docco in
last resort :-)
Cheer,