I often make snapshots of files using filename.date +%Y%m%D
.tar.gz where the date is inserted in the filename, but it does get fiddly some times.
Is there a way to set the date +%Y%m%D
expression in a macro which will always be expanded so I can use filename$DATEMACRO.gz.
Can something like that be set as an environment variable etc?
It would save a lot of errors.