"octave -q script.m > a_file" creates an extra character
Alexandros Droseltis
ml-octave at alex-droseltis.com
Sat Jul 11 08:54:51 CDT 2009
On Sat, Jul 11, 2009 at 09:43 -0400, John W. Eaton wrote:
> On 11-Jul-2009, Alexandros Droseltis wrote:
>
> | Hello!
> |
> | [Using octave 3.0.0 on linux]
> |
> | I have the following problem. Consider the file script.m with the
> | content:
> |
> | #################
> | 1;
> |
> | printf("A line");
> | #################
> |
> | After typing
> |
> | octave -q script.m > a_file
> |
> | in the command line and viewing the file "a_file" _with an editor_, a
> | strange string appears at the beginning of the file:
> |
> | ^[[?1034hA line
> |
> | Why does this happen and how could I get rid of this? I would be
> | grateful for any help.
>
> That looks like a terminal init string, probably generated when
> readline is initialized. Does it disappear if you do
>
> octave -q --no-line-editing script.m > a_file
No.
>
> ? Another option would be to set your TERM environment variable to
> something that doesn't have an init string. Maybe
>
> TERM=dumb octave -q script.m > a_file
This works but creates some other problems (for other applications).
I'll try setting TERM=dumb and resetting it after octave with a script.
> BTW, 3.0.0 is obsolete. You might consider upgrading to 3.2.0.
I'll do it and try the same with the upgraded. Thank you very much for
the answer!
Best Regards
Alexandros
More information about the Help-octave
mailing list