Hi,
I have a file called setup.weka.sun which basically sets up Weka environment. The content of setup.weka.sun is as follows.
**********************************************************
set MyDeptRoot = /r/aiml/ml-software/
set MyAgasRoot = ~/Experiments/ml-software/
set MyRoot = $MyDeptRoot
set Version = weka-3-2-3/weka-3-2-3
use jdk1.4.1
setenv WEKAHOME $MyRoot/$Version/
setenv WEKADATA $MyRoot/datasets/weka/UCI/
setenv CLASSPATH .:$MyRoot/$Version/weka.jar
unset MyDeptRoot
unset MyAgasRoot
unset MyRoot
**********************************************************
Normally, you would just type "source setup.weka.sun" to setup Weka environment on UNIX. I want to do this from a Perl script. So in my Perl script, I do the following.
$result = `source setup.weka.sun`;
For some reason, $result is always empty and Weka is never set. I know this is a simple problem but I couldn't find a way around it. Can someone help?
I have a file called setup.weka.sun which basically sets up Weka environment. The content of setup.weka.sun is as follows.
**********************************************************
set MyDeptRoot = /r/aiml/ml-software/
set MyAgasRoot = ~/Experiments/ml-software/
set MyRoot = $MyDeptRoot
set Version = weka-3-2-3/weka-3-2-3
use jdk1.4.1
setenv WEKAHOME $MyRoot/$Version/
setenv WEKADATA $MyRoot/datasets/weka/UCI/
setenv CLASSPATH .:$MyRoot/$Version/weka.jar
unset MyDeptRoot
unset MyAgasRoot
unset MyRoot
**********************************************************
Normally, you would just type "source setup.weka.sun" to setup Weka environment on UNIX. I want to do this from a Perl script. So in my Perl script, I do the following.
$result = `source setup.weka.sun`;
For some reason, $result is always empty and Weka is never set. I know this is a simple problem but I couldn't find a way around it. Can someone help?