Date: Fri, 25 Oct 1996 11:13:37 +0200 (IST) From: Nadav Eiron <nadav@barcode.co.il> To: "Dennis B. Vega" <vega@jpi.mozcom.com> Cc: questions@FreeBSD.org Subject: Re: question abou cron Message-ID: <Pine.BSF.3.91.961025111139.29902E-100000@gatekeeper.barcode.co.il> In-Reply-To: <32704B29.167EB0E7@jpi.mozcom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 25 Oct 1996, Dennis B. Vega wrote: > I'm using FreeBSD 2.1.0-RELEASE operating system. Recently, I wrote > a c-shell script that is executed by the root's crontab every 10 > minutes. My problem is the cron uses bourne shell in executing the > script even though the SHELL environment in the /etc/crontab is set > to SHELL=/bin/csh. How can I make this script run in the c-shell? > > Thanks in advance! > > Dennis Vega > As the first line of your script, put: #!/bin/csh Scripts that don't have this magic line are always run by sh. This is something that happens no matter how you run the script. The SHELL variable is used to decide on what shell will be used to execute the command you give in the crontab entry, but even csh, when given a script without a magic line, will use sh to run it. The other option (IMHO, less elegant) is have the crontab read: .... /bin/csh script Nadav
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.961025111139.29902E-100000>