help-octave
[Top][All Lists]
Advanced

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

Re: Can't execute file


From: Carlo de Falco
Subject: Re: Can't execute file
Date: Thu, 14 May 2009 19:10:18 +0200


On 14 May 2009, at 19:06, John W. Eaton wrote:


| On 14 May 2009, at 16:34, William Miner wrote:
|
| > dsl017-068-210:Octave williamminer$ cat hello
| > #! octave -qf
| > # A sample Octave program
| > printf ("Hello, world!\n");
|
| I think you have to specify the full path to the Octave executable or
| write the shebang line as:
|
| $ cat hello.m
| #! /usr/bin/env octave -qf
| printf("hello, world!")

This does not work on my system, because whatever it is that is
processing the #! line (the kernel?) passes "octave -qf" as a single
argument /usr/bin/env, and "octave -qf" does not exist.

jwe

it does work on OSX 10.5 which is the system used by the OP:

$ cat prova.m
#! /usr/bin/env octave -qf
printf("hello, world!")
$ ./prova.m
hello, world!


Unfortunately it seems not to be portable :(
c.



reply via email to

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