[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: octave shebang
From: |
Stefan van der Walt |
Subject: |
Re: octave shebang |
Date: |
Wed, 13 Jul 2005 11:59:38 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
Unfortunately, there isn't any easy way around this. Most UNIX shells
pass the argument "octave -q" as a string to env, instead of splitting
it into two.
The page at
http://www.in-ulm.de/~mascheck/various/shebang/
gives an overview of the state of things.
Regards
Stéfan
On Wed, Jul 13, 2005 at 02:12:12AM -0400, Paul Kienzle wrote:
> I'm looking for an octave shebang which doesn't depend on where octave
> is installed but instead picks it up from the path.
>
> This is the best I came up with:
>
> #!/bin/sh
> cat <<EOF | octave -q
>
> This works even without the final EOF on bash (OS X and Linux) and ksh
> (IRIX).
>
> Note that the following works from the command line, but not as #!
>
> /usr/bin/env octave -q
>
> Any other suggestions?
>
> Thanks,
>
> - Paul
>
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- octave shebang, Paul Kienzle, 2005/07/13
- Re: octave shebang,
Stefan van der Walt <=