Can't execute file
Carlo de Falco
carlo.defalco at gmail.com
Thu May 14 12:10:18 CDT 2009
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.
More information about the Help-octave
mailing list