[clug] Braindead shell?

Beveridge, Ross ross.w.beveridge at hp.com
Wed Mar 24 06:40:47 GMT 2004


su - user -c [command]

-----Original Message-----
From: linux-bounces+ross=beveridges.com.au at lists.samba.org
[mailto:linux-bounces+ross=beveridges.com.au at lists.samba.org] On Behalf
Of gbj at theforce.com.au
Sent: Wednesday, 24 March 2004 17:20
To: Antti.Roppola at brs.gov.au
Cc: linux at lists.samba.org
Subject: Re: [clug] Braindead shell?

cron starts with an empty environment

You can set environment variables in crontab itself such as:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
MAILTO=root
HOME=/

00 * * * * echo :)


Hope this helps

Grahame Jordan


> So I have a Perl script that works perfectly when run from my login, 
> but it complains bitterly when run in cron where it can't find stuff 
> like FlexLM and Oracle.
>
> Is there an easy means of (temporarily) nuking PATH, LD_LIBRARY_PATH, 
> ORACLE_HOME and all the other assumed variables within an xterm? That 
> is, easier than writing another script to un-set and re-set them?
>
> Thanks,
>
> Antti
>




More information about the linux mailing list