Variable assignment in sh
matthew at FreeBSD.org
Tue Jan 31 17:27:31 UTC 2017
On 2017/01/31 17:11, James B. Byrne via freebsd-questions wrote:
>> a shell script (FreeBSD's default scripting shell)
> What does this mean exactly? Is not CSH a shell? I thought that the
> shell used in cron was the shell of the user associated with the
> crontab file? What is cron's default shell otherwise?
He's making a distinction between a shell for interactive use -- which
defaults to tcsh or csh in the FreeBSD base system -- and a shell used
for programming shell scripts -- which defaults to /bin/sh.
Of course, either shell can be used in either role, but writing scripts
in csh is a bit painful, and /bin/sh doesn't have all the nice
bells'n'whistles for interactive use.
The default shell used for cron jobs is /bin/sh, irrespective of the
login shell of the user who owns the crontab. You can override this
from within the crontab by adding eg.
and, of course, you can just specify the appropriate shell on the
command line inside crontab or by setting a #! line at the top of any
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 972 bytes
Desc: OpenPGP digital signature
More information about the freebsd-questions