sean finney on 20 Mar 2012 17:13:17 -0700

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Need some script advice

Looks like i missed most the fun, but one unaddressed follow-up:

On Tue, Mar 13, 2012 at 01:28:47PM -0400, Michael Leone wrote:
> I explicitly specify the paths, since the script ordinarily executes from cron.

the only time you should really need to specify paths is when
 * they exist outside of directories you'd want in $PATH (like a specific
   tool in some random directory)
 * you want specifically *that* version of the command (i.e. /usr/xprg4 vs
   /usr/ucb vs /usr/bin on slowlaris systems).

in all other cases, I would say best design principles would be to
define PATH in (a) the crontab file or (b) the script itself.  I have
never, ever, seen a cron system that didn't have /bin in the default
PATH though.

Philadelphia Linux Users Group         --
Announcements -
General Discussion  --