[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rsync --delete



On Sat, Oct 17, 2020 at 12:58:04PM -0500, Mike McClain wrote:
> As for your last question, the script is called from cron and I'm
> never sure whether cron is going to be able to find things so have
> just gotten into the habit of putting the path in.

The line that actually appears *in* the crontab is interpreted by sh,
so you should avoid bashisms there.  You also need to escape % signs.

Your script, however, is executed according to the shebang at the top
of it.  So, if you use bashisms in your script, you should have a
#!/bin/bash shebang on it (assuming the script only needs to run on
Debian systems).


Reply to: