From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,e80cc4149c0e0ff4 X-Google-Attributes: gidfee84,public From: reece@dasher.wustl.edu (Reece Kimball Hart) Subject: Re: How to change defaults for crontab? Date: 1995/10/23 Message-ID: <82g2gjkflg.fsf@dasher.wustl.edu>#1/1 X-Deja-AN: 118035080 sender: reece@dasher.wustl.edu references: <46c87v$iid@vixen.cso.uiuc.edu> to: ayman@uiatma.atmos.uiuc.edu (Ayman_Ghanem) organization: Biophysics & Biochemistry, Washington University, St. Louis, USA newsgroups: comp.unix.osf.osf1 >>>>> "Ayman" == Ayman Ghanem writes: Ayman> Sorry if this sounds like a basic question. I put a crontab Ayman> file to be run by cron from my home directory, but every time Ayman> it runs cron uses SHELL /usr/bin/sh and PATH :/usr/bin ... Ayman- There are two ways to specify a shell for a script. 1) Write the script with #!/usr/bin/csh as the first line and make it executable (chmod 755 file). The script then becomes an executable command. In this case, you call file as a command from your crontab (use the full path name). 2) Explicitly call the shell (just a program) with the script file as an argument, as in $ csh file ($ is your prompt). There's no reason your crontab command couldn't be csh file. Setting SHELL will not change the execution shell used for the script in either case. This newsgroup (comp.unix.osf.osf1) is for osf1-specific queries only. A more appropriate group for this sort of query is comp.unix.questions, and I'd appreciate it if you'd ask general questions there. Doing so will keep c.u.o.o focused, distribute your question to an audience with broader expertise and thereby increase chances of a response, and may help another user. Thanks. I hope the above helps. -- Reece Kimball Hart | email: reece@dasher.wustl.edu Biophysics & Biochemistry | WWW: http://dasher.wustl.edu/~reece/ Washington Univ. School of Medicine | Phone: (314) 362-4198 (lab) -7183 (fax) St. Louis, Missouri (USA) | PGP public key available by finger & WWW