Some shell code and an outline of where I want the code to go