help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

parse error and syntax error while calling from a shell program


From: shareefbabu
Subject: parse error and syntax error while calling from a shell program
Date: Mon, 30 May 2016 02:19:43 -0700 (PDT)

Hi
I'm trying to call a octave code(.m) from a shell script. 
When i run that octave code directly from command line the .m code is
working , but when i call from shell code its throwing a parse error:  
syntax error showing my input is wrong. I'm clueless where i'm going wrong.

Anyones help so greatful

Thank you
Shareef

Here are my both shell and .m codes

Shell code calling octave code

speakerinfo=train_fold_1.txt
find ../data_train_test_fold/fold_1 -iname "fold_1_train_1.txt"|

while read line
do
echo $line 
  cat $line | while read uid 
  do
    htinfo=`grep -w ^$uid $speakerinfo |cut -f3 -d" "`
    find ../expt3/globalNORM_200n_mat_1/ -iname "*${uid}*.txt"|
       while read line_in
        do
       spkr_infile=`basename $line_in |cut -f1 -d '.'`
       infile=$line_in
       outfile=../expt3/fold_test_y/${spkr_infile}
echo $htinfo
echo $infile
       octave --quiet --eval "warning off ;
fold_Test_y('$infile''$htinfo');"   # here i'm getting some sparse error, if
i run individually this is running.  
     
     done
   done
 done

octave code :

function [] = fold_Test_y(infile,ht_class)
train_x=load(infile);
class_ht  =ht_class;
[rows_tr col_tr]=size(train_x);
train_y= repmat(class_ht,rows_tr,1);
end



--
View this message in context: 
http://octave.1599824.n4.nabble.com/parse-error-and-syntax-error-while-calling-from-a-shell-program-tp4677267.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]