help-octave
[Top][All Lists]
Advanced

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

Re: call octave from shell script (with inputfile)


From: Francesco Potorti`
Subject: Re: call octave from shell script (with inputfile)
Date: Thu, 27 Mar 2008 09:31:31 +0100

>in a shell:
>
>% octave -qf octavescript.m('inputfile.dat')

It should be

% octave -qf octavescript.m inputfile.dat

>in the example inputfile.dat is a textfile with the data I want to
>process.

It will be an argument to the script.  Look at "Executable Octave
Programs" in the manual for how to use them.  Probably inside thescript
you will need something like

read(argv(){1});

>I also tried with double quotes " and without quotes...
>
>the error is:
>bash: syntax error near unexpected token `('

This is an error form the shell interpreter, it has nothing to do with
Octave.  The '(' character is special to the shell, and you should quote
it if you want to pass it as an argument to a program.  Read the bash
manual for details.  Anyway, you do not need to do that for Octave.1111111

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
Web: http://fly.isti.cnr.it/           Key:   fly.isti.cnr.it/public.key


reply via email to

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