8 bytes of rubbish written to STDOUT upon first write

John W. Eaton jwe at bevo.che.wisc.edu
Fri Apr 18 13:27:18 CDT 2008


On 18-Apr-2008, Søren Hauberg wrote:

| fre, 18 04 2008 kl. 11:52 +0200, skrev a.grahn at fzd.de:
| > 1.) At the shell prompt execute
| > 
| > octave -qf > out.txt <<EOF
| > printf("Hello World!\n");
| > EOF
| > 
| > 2.) Open `out.txt' in a hex editor. Its contents looks like this:
| > 
| > 0000000: 1b5b 3f31 3033 3468 4865 6c6c 6f20 576f  .[?1034hHello Wo
| > 0000010: 726c 6421 0a                             rld!.
| 
| I get
| 
| sh at sh-laptop:~$ octave -qf > out.txt <<EOF
| > printf("Hello World!\n");
| > EOF
| sh at sh-laptop:~$ hd out.txt 
| 00000000  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 0a           |Hello
| World!.|
| 0000000d
| 
| This is what you'd expect, right? Perhaps you're using some odd shell or
| something?

Please see this thread:

  http://www.nabble.com/spurious-characters-to-stdout-to15755083.html#a15756588

jwe



More information about the Bug-octave mailing list