Hi,
Are you open to solutions besides a shell script? While I could do this as a shell script, it would be a lot easier and more flexible if we used a more sophisticated scripting language, such as Python.
Feel free to ask any questions. Ready to start any time.
Regards,
Bence