I generally advise against changing system defaults like that, when there's an easy alternative. It's probably not all that likely to cause a problem, but it makes a subtle change to a system-level environment which could break something else (possibly in the future, long after you've forgotten you changed it). I.e. are you certain that bash will perfectly replicate the behaviour of dash for all use cases? It's generally much safer and more maintainable to put your bash script into an executable file, then execute that file. It probably would work fine changing the shell in crontab, probably is reasonably unlikely to cause a problem, but why take the chance with it? Even if it works now, some future update may land on something where dash and bash have divergent behaviour.Why not set the shell to bash with2) Among other failings, cron runs jobs with /bin/sh (which is a primitive, limited shell) rather than the /bin/bash that you are used to.in your crontab entry.Code:
SHELL=/bin/bash
Statistics: Posted by Murph9000 — Mon Jan 06, 2025 9:10 pm