help-octave
[Top][All Lists]
Advanced

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

Re: parse error and syntax error while calling from a shell program


From: samuel WEBER
Subject: Re: parse error and syntax error while calling from a shell program
Date: Tue, 31 May 2016 08:52:28 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

Hi.

Well, my guess is that a ',' is missing:

fold_Test_y('$infile','$htinfo');"   # here i'm getting some sparse error, if

Samuël
Ps: I'm quite impressed by the shell code!

On 30/05/2016 11:19, shareefbabu wrote:
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 ;

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.

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave



reply via email to

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