in reply to Re: running .profile
in thread running .profile

this doesn't seem to work. i have created a simple test script:

#!/usr/local/bin/perl -w use strict; foreach (keys %ENV) { print "[$_] $ENV{$_}\n"; }

next i created a .profile file with some oracle environment variables in it.

when i insert the following line in cron:

* * * * * source /opt/home/u_huiar1/.profile;/opt/home/u_huiar1/perl/c +ron.pl 1>> /opt/home/u_huiar1/perl/output 2>&1

the file 'output' contains the following lines:

[LOGNAME] u_huiar1 [PATH] /usr/bin: [SHELL] /usr/bin/sh [HOME] /home/u_huiar1 [TZ] MET

somehow it does not have the oracle environment variables in its environment.

arjan huijzer

Replies are listed 'Best First'.
Re: Re: Re: running .profile
by kschwab (Vicar) on May 02, 2001 at 16:37 UTC
    source is particular to the csh shell (maybe bash/zsh/etc). Perhaps you are using ksh or sh. Try:
    * * * * * . /opt/home/u_huiar1/.profile;/opt/home/u_huiar1/perl/c +ron.pl 1>> /opt/home/u_huiar1/perl/output 2>&1
    ksh and sh use "." (the dot command) to source files.
      Thanks! This is what i was looking for.

      Arjan