If env variables is all you want to use , why not use getenv(), and
setenv() from a C program. The .profile might have other things
that you would not necessarily want to turn on every time.

As for shell script to keep changes in the current shell , scripts
have to be run with a . instead of a sh , otherwise they have to be exported
to the parent explicitly.

Bye
Kaushik

From: Rajesh Fowkar <[EMAIL PROTECTED]>
Date: Wednesday, July 19, 2000 10:58 PM


>The problem given below is on SCO Unix.
>
>How to run .profile just before running a script at a particular time. This
is needed
>because I want to set some environment variables which will be used by the
script which
>is to be run.
>
>eg. :
>30 8 * * * /usr/pf/pfbk
>
>I want to run .profile from the user pf before running the above script.
>If I put this stuff(setting environment variables) in pfbk script than it
is not getting
>executed.
>
>Any ideas ?
>
>Thanks in advance.
>
>Regards
>
>--
>Rajesh(ALIAS Shriram) Fowkar



-----------------------------------------------------------------------
The LIH mailing list archives are available at:
http://lists.linux-india.org/cgi-bin/wilma/linux-india-help

Reply via email to