calling a script from within another script

From: jeffm (royal_ranks_at_hotmail.com)
Date: 09/30/03


Date: Tue, 30 Sep 2003 16:36:05 +0200

Hi
I've got a script that sets environment variables , called env.sh and a
second one , called main.sh , which uses the environment variables set
by env.sh

Now , main.sh has these two lines (amongst other stuff)

$SCRIPTS_LOCATION/remove_all_logs.sh
$SCRIPTS_LOCATION/remove_all_tran_logs.sh

Variable SCRIPTS_LOCATION (together with other variables)is set in
env.sh as follows

export SCRIPTS_LOCATION=/root/scripts
export APP_INSTALL_LOGS=/websphere/logfiles/work
export WSCPDIR=/opt/WebSphere/bin
export WS_TRAN_LOGS=/opt/Websphere/tranlog

How do I call env.sh from within main.sh , to set the environment
variables that are later used (in main.sh) ?
Both main.sh and env.sh reside in the same directory

jeff mutonho



Relevant Pages

  • Re: logon/logoff scripts...
    ... I am using the %clientname% and %machine% name environment variables to ... each user you can specify a login script but nowhere do I see the ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Startup script ?
    ... I.E where do I put the script ... Every process has a set of environment variables, ... If there is some script that runs apt-get ... that will get set whenever *lots* of users login, ...
    (Debian-User)
  • Re: exporting a variable to global shells
    ... Environment variables are a user-space concept - ... When the script is exiting the echo stdout's the proxy adress, ... setting up my network differently depending on where/what I connect to. ... With regard to actually *setting* the proxy server, ...
    (Debian-User)
  • RE: DBD::Oracle install failed for fork test in t/10general.t
    ... environment variables $ORACLE_SID and $TWO_TASK. ... the connection is local and a dedicated server is bequeathed ... I'm not sure what 'Unix init process' is, ... It works when I ran a script pointing to the 'blib'. ...
    (perl.dbi.users)
  • Re: Which PHP am I running?
    ... php-win.exe) that is currently running (ie. how was this script called) ... apache2handler when I'm running php as a web server module. ... But why does it matter if its using the nix or the windows php ... If you're worried about differences between environment variables ...
    (comp.lang.php)