Subject: Re: CVS commit: basesrc/bin/ksh
To: None <>
From: Joerg Klemenz <>
List: tech-userlevel
Date: 10/01/2002 17:28:55
Roland Dowdeswell wrote:
> On 1033321233 seconds since the Beginning of the UNIX epoch
> Joerg Klemenz wrote:
> >
> >But many a script is run from cron or at and there is no way to force
> >the loading of any defaults or even a PATH.
> If you're writing scripts then you should generally call things out
> by their absolute path, or set the PATH yourself at the top of the
> script.  This isn't all that hard and it prevents the scripts from
> becoming broken if the environment gets changed.  If you want to get
> these defaults from a standard location you can simply . a file at
> the top of your scripts.

It's a neverending source of confusion that scripts work when called
from a shell, but fail from cron et al. Users simply don't understand

It would be nice to have a default way to "enforce" the setting of
PATH, PRINTER, whatever.

An ". /etc/sh.env" will work too, but a default /etc/zshenv is simply
easier. In reality, 80% of users will forget ". /etc/sh.env".

> Although, I'm not sure what this has to do with root's default
> shell 

Probably nothing