fferent approach. Rather than trying to use cp to make a backup of each file under a slightly changed name I might just make a directory (usually using the date and my login ... ymodule.test
It is better to put such stuff in a Makefile, with GNU make:
top_srcdir = ...
builddir = ...
... ripting. Creating useable and reuseable functions makes good sense; it also makes your main scripts less maintenance-prone.
When y