help-octave
[Top][All Lists]
Advanced

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

Re: invoking octave from command line with ubuntu


From: Peter A. Gustafson
Subject: Re: invoking octave from command line with ubuntu
Date: Wed, 28 Nov 2007 11:12:23 -0500
User-agent: KMail/1.9.7

On Wednesday 28 November 2007 05:28:56 nikkos wrote:
> Hi,
>
> if i open a terminal and write octave (so the prompt now is from octave) i
> can run my program e.g. klo1.m
>
> I put in the first line of my program:    #!/usr/bin/octave    and i made
> the file executable.
>
> But still, when i write:      /home/student/m/klo1.m                    i
> don't take anything, neither error nor my output.
>
> Do you have any idea?

What do you mean by "don't take anything"?  Do you mean you can't pass an 
argument or do you mean that octave doesn't run when you execute the octave 
script?  Or maybe no output is generated when octave is running?

I'm not familiar with ubuntu to know where octave is installed... if octave 
isn't running, then the path I told you may not be correct.  type 'which 
octave' to determine the correct path and put that at the top of the file 
instead of /usr/bin/octave.

This (or a variant with the correct path) should work as a basic octave script 
that runs at the command line:

#!/usr/bin/octave
disp("Hello world\n");

Pete


reply via email to

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