Share

GNU Octave Repository

Email Archive: octave-dev (read-only)

2000:
Jan
   
Feb
   
Mar
   
Apr
(1)
May
   
Jun
   
Jul
   
Aug
   
Sep
   
Oct
(14)
Nov
(10)
Dec
   
2001:
Jan
   
Feb
(4)
Mar
   
Apr
(3)
May
(13)
Jun
(2)
Jul
(7)
Aug
   
Sep
(2)
Oct
(5)
Nov
(8)
Dec
   
2002:
Jan
   
Feb
   
Mar
(19)
Apr
(8)
May
(8)
Jun
(8)
Jul
(4)
Aug
(8)
Sep
(19)
Oct
(13)
Nov
(37)
Dec
(2)
2003:
Jan
(7)
Feb
(23)
Mar
(16)
Apr
(4)
May
(18)
Jun
(9)
Jul
(7)
Aug
(6)
Sep
(7)
Oct
   
Nov
(39)
Dec
(57)
2004:
Jan
(21)
Feb
(15)
Mar
(17)
Apr
(9)
May
(17)
Jun
(65)
Jul
(33)
Aug
(48)
Sep
(93)
Oct
(35)
Nov
(18)
Dec
(4)
2005:
Jan
(20)
Feb
(59)
Mar
(17)
Apr
(59)
May
(77)
Jun
(32)
Jul
(34)
Aug
(8)
Sep
(34)
Oct
(26)
Nov
(65)
Dec
(66)
2006:
Jan
(45)
Feb
(37)
Mar
(50)
Apr
(32)
May
(48)
Jun
(42)
Jul
(12)
Aug
(53)
Sep
(51)
Oct
(79)
Nov
(46)
Dec
(25)
2007:
Jan
(120)
Feb
(78)
Mar
(45)
Apr
(91)
May
(155)
Jun
(66)
Jul
(96)
Aug
(110)
Sep
(145)
Oct
(189)
Nov
(68)
Dec
(160)
2008:
Jan
(163)
Feb
(212)
Mar
(209)
Apr
(157)
May
(216)
Jun
(120)
Jul
(80)
Aug
(83)
Sep
(98)
Oct
(120)
Nov
(80)
Dec
(129)
2009:
Jan
(45)
Feb
(80)
Mar
(174)
Apr
(142)
May
(133)
Jun
(191)
Jul
(183)
Aug
(138)
Sep
(77)
Oct
(141)
Nov
(152)
Dec
   
From: Rob Nicholas <rnicholas@at...> - 2008-04-10 18:46
Hello all,

I'm in the process of trying to convert some of the Octave (and
Matlab) scripts that I use on a regular basis into stand-alone
executables, but I've been unable to get my scripts to run. For
example, if I run the simple two-line script

#! /Applications/Octave.app/Contents/Resources/bin/octave
disp('hello');

from the shell (e.g. './otest'), I get

./otest: line 2: syntax error near unexpected token `'hello''
./otest: line 2: `disp('hello');'

as output. The script works fine, of course, from within the
interactive environment or if I do 'octave otest' from the shell. Can
anyone make sense of what's going on here? Is this a shell error
rather than an Octave error? FYI, I'm using the most recent version of
Octave.app (December 2007) on a new iMac running Leopard.

Thanks,
Rob


    From: Thomas Treichl <Thomas.Treichl@gm...> - 2008-04-10 20:11
    Rob Nicholas schrieb:
    > Hello all,
    >
    > I'm in the process of trying to convert some of the Octave (and
    > Matlab) scripts that I use on a regular basis into stand-alone
    > executables, but I've been unable to get my scripts to run. For
    > example, if I run the simple two-line script
    >
    > #! /Applications/Octave.app/Contents/Resources/bin/octave
    > disp('hello');
    >
    > from the shell (e.g. './otest'), I get
    >
    > ./otest: line 2: syntax error near unexpected token `'hello''
    > ./otest: line 2: `disp('hello');'
    >
    > as output. The script works fine, of course, from within the
    > interactive environment or if I do 'octave otest' from the shell. Can
    > anyone make sense of what's going on here? Is this a shell error
    > rather than an Octave error? FYI, I'm using the most recent version of
    > Octave.app (December 2007) on a new iMac running Leopard.

    It's not clear to me where the problem really occurs but I somehow can see that
    Octave isn't started. I also mentioned a similiar problem if I use a shebang
    line for a /usr/bin/tclsh script - so I expect it's somehow caused by the OS (at
    least on my 10.4 system it looks the same as on your 10.5 system).

    But the good news is that I've a workaround for you, use the following shebang
    line and then Octave starts up and should produce the output that you desire:

    #!/bin/sh /Applications/Octave.app/Contents/Resources/bin/octave --quiet
    disp ('hello');

    Thomas

    From: Rob Nicholas <rnicholas@at...> - 2008-04-10 20:13
    Thanks Thomas -- works great.

    From: Jonas Wagner <j.w@gm...> - 2008-04-11 04:25
    Hello,

    > #! /Applications/Octave.app/Contents/Resources/bin/octave
    > disp('hello');

    Is it just the space between #! and /App...? I know it shouldn't be, but
    shells are sometimes quirky. On my Linux box, it works with or without
    space, but I'm suspicious because Thomas' workaround does not contain a
    space.

    Greetings,
    Jonas

440 messages have been excluded from this view by a project administrator.