Quantcast

Request for information

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Request for information

mkalita
Hi,

I have a basic doubt regarding octave interpreter.

I am trying to run an octave script.

At the command line terminal, when I usually run /usr/bin/octave and then
a file a2, it runs fine.

When I make a script file a with the contents-

#! /usr/bin/octave -qf
/home/ubuntu/Desktop/b/a2.m;

and run a,

it says 1: %: not found
        2: Syntax error: Bad for loop variable

(The first line of my a2 file is a comment an second line starts a for loop).

Thanks
Mrinmay Kalita

_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for information

marco atzeri-2
On 8/6/2011 12:59 AM, [hidden email] wrote:

> Hi,
>
> I have a basic doubt regarding octave interpreter.
>
> I am trying to run an octave script.
>
> At the command line terminal, when I usually run /usr/bin/octave and then
> a file a2, it runs fine.
>
> When I make a script file a with the contents-
>
> #! /usr/bin/octave -qf
> /home/ubuntu/Desktop/b/a2.m;
>
> and run a,
>
> it says 1: %: not found
>          2: Syntax error: Bad for loop variable
>
> (The first line of my a2 file is a comment an second line starts a for loop).
>
> Thanks
> Mrinmay Kalita

probably the document is written in a different character set (UTF-8 ?)
than octave expects so the '%' is not recognized.
The second error is probably a follow up of the first.

Try
od -c a2.m | header

to see the begin of the file as ASCII character.

If you remove the first line, does the script works ?

Marco



_______________________________________________
Help-octave mailing list
[hidden email]
https://mailman.cae.wisc.edu/listinfo/help-octave
Loading...