help-octave
[Top][All Lists]
Advanced

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

Re: Executable octave program


From: François PH Lapointe
Subject: Re: Executable octave program
Date: Thu, 21 Mar 2019 17:36:40 -0400

Hello Mike and Kai,

I have found the error… it was the extra line. It works perfectly. 

Thank you very much for your help. 


François

> On Mar 21, 2019, at 17:20, Mike Miller <address@hidden> wrote:
> 
> On Thu, Mar 21, 2019 at 16:54:44 -0400, François PH Lapointe wrote:
>> Good day Kai,
>> 
>> it is still saying an error:
>> 
>> ./m2.sh: line 5: syntax error near unexpected token `"Hello, world!\n"'
>> ./m2.sh: line 5: `printf ("Hello, world!\n");’
> 
> Can you post an exact copy of your file 'm2.sh' somewhere?
> 
> This error message comes from the bash shell, which indicates that bash
> is trying to interpret this file as a shell script, not calling Octave.
> 
> I'm suspicious because Kai's example only contained 4 lines, but your
> error message references line 5. Did you accidentally insert a newline
> at the start of the file? If I do that, I can reproduce your error.
> 
> The very first byte of the file needs to be '#'.
> 
> -- 
> mike




reply via email to

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