Hi,

I have a bash file that loads some variables needed by some perl scripts, I 
need the environment to be available at any moment, so i included the line 
that loads the environment in my .bash_profile, but when the perl scripts 
runs from the crontab, the environment is not available.

So i use another bash script to load the environment and run the perl script 
from one line in the crontab, the content of the load and run script is this:

-----------------------------------------------------------------------------------
!/bin/sh
. ~max/tmp/g_amb.sh   # <-- This Loads the environment.
/home/max/tmp/l_amb.pl  # <-- This uses the environment loaded.
-----------------------------------------------------------------------------------

How could i load the environment from the perl script without using the load 
and run script ?

Some perl or bash scripts are going to use the environment variables and i 
dont want to define the variables on every script, 

this is a sample content of the script that loads the enviroment:

-----------------------------------------------------------------------------------
#!/bin/sh

PVAR="Var P"
XVAR="Var X"

export PVAR XVAR
-----------------------------------------------------------------------------------

thanks

saludos
max


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to