[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Executable octave program
From: |
Mike Miller |
Subject: |
Re: Executable octave program |
Date: |
Thu, 21 Mar 2019 14:20:36 -0700 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
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