TRAPing
I wonder if the mv at the end of the script shouldn't be part of a TRAP.
At the moment, if the script fails it leaves the resulting directory in an unusable state, and each consecutive run would not be able to recover.
I wonder if the mv at the end of the script shouldn't be part of a TRAP.
At the moment, if the script fails it leaves the resulting directory in an unusable state, and each consecutive run would not be able to recover.