4 ms·
Do the cron entries work as-is? I’m sitting here trying to decide if cron will break here: aws s3 cp /path/to/backup.gz s3://mybucket/backup-`date +%H`.gz
by CraigJPerry 4y ago
Do the cron entries work as-is? I’m sitting here trying to decide if cron will break here:
aws s3 cp /path/to/backup.gz s3://mybucket/backup-`date +%H`.gz
The % is going to be interpreted as a newline, it should need escaping as in date +\%H
But it’s in backticks (subshell) so now I’m doubting myself and thinking maybe the subshell saves this but my brain is screaming NO NO BUG! :-)
I’m going to have to spin up a VM to test it and seek inner peace here :-)
- CraigJPerry 4y agoYeah this isn’t used in the cron line itself, this is wrapped in a script further down the article and the script is run from cron, which makes sense and no bug.