austinj has asked for the wisdom of the Perl Monks concerning the following question:
so far I have#! /bin/csh setenv SGE_ROOT /appl/lsf/grid_bins set ARCH = `$SGE_ROOT/util/arch` set DEFAULTMANPATH = `$SGE_ROOT/util/arch -m` set MANTYPE = `$SGE_ROOT/util/arch -mt` setenv SGE_CELL default unsetenv SGE_QMASTER_PORT unsetenv SGE_EXECD_PORT # library path setting required only for architectures where RUNPATH i +s not supported if ( $?MANPATH == 1 ) then setenv MANPATH $SGE_ROOT/${MANTYPE}:$MANPATH else setenv MANPATH $SGE_ROOT/${MANTYPE}:$DEFAULTMANPATH endif set path = ( $SGE_ROOT/bin/$ARCH $path ) switch ($ARCH) case "sol*": case "lx*": breaksw case "*": set shlib_path_name = `$SGE_ROOT/util/arch -lib` if ( `eval echo '$?'$shlib_path_name` ) then set old_value = `eval echo '$'$shlib_path_name` setenv $shlib_path_name "$SGE_ROOT/lib/$ARCH":"$old_value" else setenv $shlib_path_name $SGE_ROOT/lib/$ARCH endif unset shlib_path_name endsw unset ARCH DEFAULTMANPATH MANTYPE old_value
if there is a cleaner way to somehow "source" the csh file or any other suggestions I'm open to whatever. Thanks in advance for your help, Austin#!/usr/local/bin/perl -w use strict; use Switch; $ENV{SGE_ROOT} = "/appl/lsf/grid_bins"; my $ARCH = $ENV{SGE_ROOT} . "/util/arch"; my $DEFAULTMANPATH = $ENV{SGE_ROOT} . "/util/arch -m"; my $MANTYPE = $ENV{SGE_ROOT} . "/util/arch -mt"; $ENV{SGE_CELL} = "default"; delete($ENV{SGE_QMASTER_PORT}); delete($ENV{SGE_EXECD_PORT}); # NEED HELP HERE
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Environment Variable Setting
by chrestomanci (Priest) on Apr 23, 2012 at 16:33 UTC | |
|
Re: Environment Variable Setting
by Corion (Patriarch) on Apr 23, 2012 at 16:30 UTC | |
|
Re: Environment Variable Setting
by aaron_baugher (Curate) on Apr 23, 2012 at 17:43 UTC | |
by austinj (Acolyte) on Apr 23, 2012 at 19:03 UTC | |
by aaron_baugher (Curate) on Apr 23, 2012 at 21:14 UTC | |
by Anonymous Monk on Apr 24, 2012 at 14:50 UTC |